# @smartesting/flaky-test-detector

> KISS approach for flaky test detection

Latest version **1.0.3** (published 2023-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @smartesting/flaky-test-detector
pnpm add @smartesting/flaky-test-detector
yarn add @smartesting/flaky-test-detector
bun add @smartesting/flaky-test-detector
```

Provides the command `flaky-test-detector`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-07-20 |
| First published | 2023-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 27 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Smartesting |
| Maintainers | jracenet, admin-smartesting, smart-rfe, c.grandpierre, vincentpsmartesting, yakaldir, aymerictn |
| Keywords | test, flaky-tests |

## Links

- npm: https://www.npmjs.com/package/@smartesting/flaky-test-detector
- Repository: https://github.com/Smartesting/flaky-test-detector
- Homepage: https://github.com/Smartesting/flaky-test-detector#readme
- Issues: https://github.com/Smartesting/flaky-test-detector/issues
- npm.io page: https://npm.io/package/@smartesting/flaky-test-detector

## Dependencies (4)

- [commander](https://npm.io/package/commander.md) ^9.5.0
- [junit2json](https://npm.io/package/junit2json.md) ^3.0.5
- [@teppeis/multimaps](https://npm.io/package/@teppeis/multimaps.md) ^2.0.0
- [@cucumber/cucumber-json-converter](https://npm.io/package/@cucumber/cucumber-json-converter.md) ^0.0.3

## Recent versions

- 1.0.3 (latest) — 2023-07-20
- 1.0.2 — 2023-02-27
- 1.0.1 — 2023-02-27
- 1.0.0 — 2023-02-27
- 0.1.1 — 2023-01-20
- 0.1.0 — 2023-01-19

## README

# @smartesting/flaky-test-detector

[![Node.js CI](https://github.com/Smartesting/flaky-test-detector/actions/workflows/node.js.yml/badge.svg)](https://github.com/Smartesting/flaky-test-detector/actions/workflows/node.js.yml)

KISS approach for flaky test detection:

- run the tests `n` times
- check the results
- find tests which do not have consistent results

## Installing

```
npm i @smartesting/flaky-test-detector
```

## Detect flaky tests

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 tests
- `test-output-file`: the file in which the test runner will output the result. Only JUnit reports are supported for now
- `test-output-format`: the test result format of the test output file. Should be `junit`or `cucumberJson`
- `repeat`: the number of time the tests will be executed

---
_Source: https://npm.io/package/@smartesting/flaky-test-detector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
