-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: testing: re-print failed test names before exiting #41748
Comments
What if all of them (or 80% of them) failed? |
Then I would re-print the names of all failed tests.
|
@ALTree The comments in those bugs are fair. However running the test suite with So if it isn't desired to implement a re-print of failed test names in the end of the test suite would it then be at least possible to provide details via |
It's not up to me to decide on this, but I feel it would indeed be better to differentiate this from the previously rejected proposals by making it about |
@ALTree If this proposal is rejected I would open a new proposal to not clutter this proposal. ;-) |
This is one of the first problems gotestsum (pkg.go.dev) was built to solve. It runs To only list the failed tests you would use
You can use Both the default summary, and the
I understand you are looking for something in the test suite itself. Why is it a problem to use a different binary? |
Using a different binary is fine for a single developer or a few developers. However it does not scale well the more developers and automation is involved as each developers/automation needs to diverge from their usual behavior/setup. |
Overall I get the impression that this proposal wouldn't benefit enough people to be feasible. Thanks to everyone who provided feedback for this proposal. <3 |
The new proposal is #41878. |
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:
-test.v
is given.M
struct (https://pkg.go.dev/testing#M).The text was updated successfully, but these errors were encountered: