Skip to content

proposal: testing: test -count <n> -json output should include count in json output #77319

@croepha

Description

@croepha

Proposal Details

Some examples:

{
  "Time":"2026-01-26T19:42:15.065741002Z",
  "Action":"output",
  "Package":"mod.local/foo/bar",
  "Test":"TestFooBar",
  "Iteration":3,
  "Output":"some test output"
}
{
  "Time": "2026-01-26T19:42:19.4483534Z",
  "Action": "fail",
  "Package":"mod.local/foo/bar",
  "Test":"TestFooBar",
  "Iteration":3,
  "Elapsed": 4.408
}

The "Iteration":3 field added above.

So, if you ran go test -count 10, you would expect to see output with "Iteration":0, "Iteration":1, "Iteration":2 ... "Iteration":9

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goProposalToolProposalIssues describing a requested change to a Go tool or command-line program.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions