gooze run

Runs mutation testing and writes reports. This is the main command.

Usage

gooze run [global flags] [paths...]

What it does (high level)

  1. Generates mutations for a source file.
  2. Applies one mutation.
  3. Runs tests to see if they fail.
  4. Writes results into the reports directory.

Parallel workers

Run faster by using multiple workers:

gooze run -p 4 ./...

This example runs up to 4 mutations at the same time.

Timeouts

Gooze stops a mutation test if it takes too long. In some versions you can configure this with a flag. Check your version with gooze run --help.

gooze run --help

If you see many suspicious failures, run verbose and inspect logs:

gooze run --verbose ./...

Caching / incremental runs

Gooze can reuse stored reports if nothing changed. To force a full re-run:

gooze run --no-cache ./...

Sharding (CI)

Sharding splits the work across jobs. Example with 3 jobs:

gooze run -s 0/3 ./...
gooze run -s 1/3 ./...
gooze run -s 2/3 ./...

After all jobs finish, merge reports:

gooze merge