mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Add a tool to detect and report on unreliable tests
Add a flaky test detection system that repeatedly runs tests, captures results, and generates reports to identify inconsistent test behavior. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9bea85b0-6b8f-4d55-b964-1080f91ee9a0 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 9dc019dc-2bb9-416a-80ad-527c2c506698 Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -102,6 +102,25 @@ npm test -- --grep "Security"
|
||||
npm test -- tests/concurrent-writes.test.js
|
||||
```
|
||||
|
||||
### Flaky Test Detection
|
||||
A flaky test runner is available to identify tests that pass inconsistently:
|
||||
|
||||
```bash
|
||||
npm run test:flaky # Run 10 iterations (default)
|
||||
npm run test:flaky:quick # Run 3 iterations (quick check)
|
||||
npm run test:flaky:thorough # Run 20 iterations (thorough analysis)
|
||||
```
|
||||
|
||||
Configuration via environment variables:
|
||||
- `FLAKY_TEST_ITERATIONS` - Number of test runs (default: 10)
|
||||
- `FLAKY_TEST_TIMEOUT` - Timeout per run in ms (default: 300000)
|
||||
- `FLAKY_OUTPUT_DIR` - Output directory (default: ./flaky-test-results)
|
||||
|
||||
Reports are generated in `flaky-test-results/` including:
|
||||
- Markdown report with flaky tests sorted by failure rate
|
||||
- JSON data file with detailed per-test run history
|
||||
- Individual iteration JSON results for debugging
|
||||
|
||||
See `docs/test-specs/coverage-gaps.md` for aggregated coverage gaps across all areas.
|
||||
|
||||
## External Dependencies
|
||||
|
||||
Reference in New Issue
Block a user