Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Nov 6, 2024
1 parent 188a093 commit 2fa3589
Showing 1 changed file with 4 additions and 33 deletions.
37 changes: 4 additions & 33 deletions tools/flakeguard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,11 @@ go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakegu

## Usage

Flakeguard offers two main commands: `find` and `run`.
Flakeguard offers two main commands:
- `find` identifies test packages affected by recent changes.
- `run` executes tests multiple times to identify flaky tests

### `find` Command

The `find` command identifies test packages affected by recent changes.

#### Flags for `find` Command

- `--project-path, -r` : Path to the Go project. Defaults to the current directory.
- `--base-ref` (required): Git reference (branch, tag, or commit) for comparing changes.
- `--verbose, -v` : Enables verbose mode.
- `--json` : Outputs results in JSON format.
- `--filter-empty-tests` : Filters out test packages with no actual test functions (can be slow on large projects).
- `--excludes` : List of paths to exclude.
- `--levels, -l` : Levels of recursion for dependency search, with `0` for unlimited. `2` by default.
- `--find-by-test-files-diff` : Enable mode to find affected test packages by changes in test files.
- `--find-by-affected-packages` : Enable mode to find affected test packages based on changes in any project package.
- `--only-show-changed-test-files` : Display only changed test files and exit.

### `run` Command

The `run` command executes tests multiple times to identify flaky tests.

#### Flags for `run` Command

- `--project-path, -r` : Path to the Go project. Defaults to the current directory.
- `--test-packages-json` : JSON-encoded string of test packages to run.
- `--test-packages` : List of test packages to run.
- `--run-count, -c` : Number of times to run the tests.
- `--race` : Enable race condition detection.
- `--output-json` : File path to output test results in JSON format.
- `--threshold` : Threshold (0-1) for determining flakiness (e.g., `0.8` to pass if 80% successful).
- `--skip-tests` : List of tests to skip.
- `--fail-fast` : Stop on the first failure if threshold is set to `1.0`.
Run with `--help` to see all flags for the commands.

### JSON Output

Expand Down

0 comments on commit 2fa3589

Please sign in to comment.