{"id":34099688,"url":"https://github.com/withsecureopensource/flaky-tests-detection","last_synced_at":"2025-12-14T16:02:06.275Z","repository":{"id":38242130,"uuid":"383428435","full_name":"WithSecureOpenSource/flaky-tests-detection","owner":"WithSecureOpenSource","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-15T09:19:22.000Z","size":105,"stargazers_count":27,"open_issues_count":4,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-24T09:59:26.100Z","etag":null,"topics":["analysis","test","xunit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WithSecureOpenSource.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-06T10:25:24.000Z","updated_at":"2025-07-07T11:47:38.000Z","dependencies_parsed_at":"2023-01-29T02:31:12.546Z","dependency_job_id":null,"html_url":"https://github.com/WithSecureOpenSource/flaky-tests-detection","commit_stats":{"total_commits":91,"total_committers":12,"mean_commits":7.583333333333333,"dds":0.7582417582417582,"last_synced_commit":"1c85b3f0a660dfafec468070472ed40b6b925c10"},"previous_names":["f-secure/flaky-tests-detection"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/WithSecureOpenSource/flaky-tests-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WithSecureOpenSource%2Fflaky-tests-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WithSecureOpenSource%2Fflaky-tests-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WithSecureOpenSource%2Fflaky-tests-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WithSecureOpenSource%2Fflaky-tests-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WithSecureOpenSource","download_url":"https://codeload.github.com/WithSecureOpenSource/flaky-tests-detection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WithSecureOpenSource%2Fflaky-tests-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27730944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","test","xunit"],"created_at":"2025-12-14T16:01:12.627Z","updated_at":"2025-12-14T16:02:06.266Z","avatar_url":"https://github.com/WithSecureOpenSource.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flaky tests detection\n\n\u003ccenter\u003e\u003cimg src=\"https://github.com/F-Secure/flaky-tests-detection/blob/master/docs/imgs/Flaky-test-detection.png\" width=\"120px\" height=\"120px\"/\u003e\u003c/center\u003e\n\nVisualize tests whose state changes most often. During software development, it is often common that some tests start to randomly fail,\nbut finding those tests is a tedious and time consuming problem. Flaky tests detection solves that problem by processing historical xunit test\nresults and checks which tests changes state most often. Flaky tests detection is available as Github Action plugin and\n[Python package](https://pypi.org/project/flaky-tests-detection/). For usage, see [example](https://github.com/F-Secure/flaky-test-ci)\nat the `actions` page.\n\nImplementation is based on [\"Modeling and ranking flaky tests at Apple\"](https://dl.acm.org/doi/10.1145/3377813.3381370) by Kowalczyk, Emily \u0026 Nair, Karan \u0026 Gao, Zebao \u0026 Silberstein, Leo \u0026 Long, Teng \u0026 Memon, Atif.\n\n## Features\n\n* Prints out top test names and their latest calculation window scores (normal fliprate and exponentially weighted moving average fliprate that take previous calculation windows into account).\n* Calculation grouping options:\n  * `n` days.\n  * `n` runs.\n* Heatmap visualization of the scores and history.\n  \n## Parameters\n\n### Data options (choose one)\n\n* `--test-history-csv`\n  * Give a path to a test history csv file which includes three fields: `timestamp`, `test_identifier` and `test_status`.\n* `--junit-files`\n  * Give a path to a folder with `JUnit` test results.\n  \n### Calculation options\n\n* `--grouping-option`\n  * `days` to use `n` days for fliprate calculation windows.\n  * `runs` to use `n` runs for fliprate calculation windows.\n  \n* `--window-size`\n  * Fliprate calculation window size `n`.\n  \n* `--window-count`\n  * History size for exponentially weighted moving average calculations.\n  \n* `--top-n`\n  * How many top highest scoring tests to print out.\n### Heatmap generation\n* `--heatmap`\n  * Turn heatmap generation on.\n  * Two pictures generated: normal fliprate and exponentially weighted moving average fliprate score.\n  * Same parameters used as with the printed statistics.\n  \n### Full examples\n\n* Precomputed `test_history.csv` with daily calulations. 1 day windows, 7 day history and 5 tests printed out.\n  * `--test-history-csv=example_history/test_history.csv --grouping-option=days --window-size=1 --window-count=7 --top-n=5`\n* `JUnit` files with calculations per 5 runs. 15 runs history and 5 tests printed out.\n  * `--junit-files=example_history/junit_files --grouping-option=runs --window-size=5 --window-count=3 --top-n=5`\n* Precomputed `test_history.csv` with daily calculations and heatmap generation. 1 day windows, 7 day history and 50 tests printed and generated to heatmaps.\n  * `--test-history-csv=example_history/test_history.csv --grouping-option=days --window-size=1 --window-count=7 --top-n=50 --heatmap` \n\n## Install module\n\n* `make install`\n\n## Install module and development packages\n\n* `make install_dev`\n\n## Run pytest\n\n* `make run_test`\n\n## Acknowledgement\n\nThe package was developed by [F-Secure Corporation][f-secure] and [University of Helsinki][hy] in the scope of [IVVES project][ivves]. This work was labelled by [ITEA3][itea3] and funded by local authorities under grant agreement “ITEA-2019-18022-IVVES”\n\n[ivves]: http://ivves.eu/\n[itea3]: https://itea3.org/\n[f-secure]: https://www.f-secure.com/en\n[hy]: https://www.helsinki.fi/en/computer-science\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwithsecureopensource%2Fflaky-tests-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwithsecureopensource%2Fflaky-tests-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwithsecureopensource%2Fflaky-tests-detection/lists"}