Skip to content

proposal: testing: re-print failed test names before exiting #41748

@michael-schaller

Description

@michael-schaller

Issue:
Currently if an unit test suite fails it only prints FAIL in the very end.
With very large test suites that log a lot and heavily use t.Parallel() it can be hard to find the actual test failures in the output.
(The test suite in my case produces about 6500 lines of output.)

Proposal:
Re-print the failed test names before exiting.
Then the test suite can be re-run with -test.run=... to debug the failed test(s).

Code location in question:
https://github.com/golang/go/blob/go1.15.2/src/testing/testing.go#L1363-L1367

Additional notes:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions