KISS approach for flaky test detection
npm install @smartesting/flaky-test-detector
KISS approach for flaky test detection:
- run the tests n times
- check the results
- find tests which do not have consistent results
```
npm i @smartesting/flaky-test-detector
Add a target in your package.json file:
`json`
{
"scripts": {
"detectFlaky": "flaky-test-detector.ts --run-tests \"npm run test\" --test-output-file=./test-results.xml --test-output-format=junit --repeat=5"
}
}
The script takes four arguments:
- run-tests: the command used to execute the teststest-output-file
- : the file in which the test runner will output the result. Only JUnit reports are supported for nowtest-output-format
- : the test result format of the test output file. Should be junitor cucumberJsonrepeat`: the number of time the tests will be executed
-