flakestress

command module
v0.0.0-...-8f8d365 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

README

flakestress

Go Reference

The flakestress command stress-tests Go packages to find flaky tests.

It compiles a test binary once and then runs it many times in parallel, reporting failures. It is similar to golang.org/x/tools/cmd/stress but with some usability niceties.

Install

go install github.com/bradfitz/flakestress@latest

Usage

flakestress [flags] <target>

The target can be:

github.com/foo/bar              # test the whole package
github.com/foo/bar.TestBlah     # test only TestBlah
github.com/foo/bar.TestBlah/sub # test only a subtest
TestBlah                        # git grep to find the package
TestBlah/sub                    # git grep, with subtest

If a bare test name is ambiguous (found in multiple packages), flakestress errors and lists the fully qualified options.

By default it runs NumCPU*2 parallel workers for 1 minute with -failfast mode enabled. Each worker buffers its output and only failure output is printed, serialized to avoid interleaving.

Flags
-p N          number of parallel workers (default NumCPU*2)
-duration d   how long to run (default 1m)
-failfast     stop on first failure (default true)
-quiet        suppress periodic status updates

Documentation

Overview

The flakestress command stress-tests Go packages to find flaky tests.

It compiles a test binary once and then runs it many times in parallel, reporting failures. It is similar to golang.org/x/tools/cmd/stress but with some usability niceties.

Usage:

flakestress [flags] <target>

The target can be:

github.com/foo/bar              # test the whole package
github.com/foo/bar.TestBlah     # test only TestBlah
github.com/foo/bar.TestBlah/sub # test only a subtest
TestBlah                        # git grep to find the package
TestBlah/sub                    # git grep, with subtest

If a bare test name is ambiguous (found in multiple packages), flakestress errors and lists the fully qualified options.

By default it runs NumCPU*2 parallel workers for 1 minute with -failfast mode enabled. Each worker buffers its output and only failure output is printed, serialized to avoid interleaving.

Flags:

-p N          number of parallel workers (default NumCPU*2)
-duration d   how long to run (default 1m)
-failfast     stop on first failure (default true)
-quiet        suppress periodic status updates

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL