-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: flag show skipped #34306
Comments
While I agree that this is generally useful, this can be accomplished with little effort today:
If you need anything fancier, you could also write a short wrapper around |
See also #25951. |
This would seem like taking the 'go test pkg1 pkg2' behavior, where it silences the output from pkg1 if pkg1 succeeds but shows pkg2 if pkg2 fails, down to the individual test case level. That seems fine given a good name. |
To summarize the state of the world:
This issue is asking for a way to see failing test results and skips, but not passes. I mistakenly thought last week that there was not a mode that shows only failing test results. That's the default mode. That mode should very likely not show skips, since if all you have are passes and skips, that's a successful run. Given that we already have a "only failing test results" mode, I am not sure I see the strong rationale for a "only fails and skips" mode. Especially since it can be reconstructed with go test -json and a filter, or just with grep. How important this is clearly depends on exactly how much you care about skips. If you know about the skip and it's supposed to be there, printing it is just noise. |
I argue that I would probably use I could probably go down the path of the |
A skipped test isn't actually a pass but also not actually a fail. Based on the discussion above, this seems like a likely decline. |
I disagree with
In my experience, it is usually something that either cannot be tested in a specific environment, like CI or a test that needs to be updated that someone skipped in order to get through the CI until the work can be done. I want my tech debt visible. |
Skips aren't generally tech debt, though. For example, in some of the portable projects I maintain, there are lots of tests that can only run on Windows, while others can only run on Linux or Unix-y systems. It's literally impossible to run all the tests at once without skips, as far as I can tell. Showing skips similar to failures, or treating them like tech debt, would in my opinion cause pain for no reason in cases like that.
If you indeed have tech debt, I'd encourage you to look at #25951. |
Can't you use build tags (or filename suffixes) to only include platform-specific tests on the appropriate platforms? |
Sure, I could. But skips on I'm still not sure why a flag here is explicitly needed, though. I use commands like |
No change in consensus, so declining. |
I would love if there was a flag for
go test
that was somewhere between normal and verbose that only showed failures and skips.go test ./...
hides that tests were skippedgo test -v ./...
show too much so I miss thingsIt would be lovely to have something like
go test -showSkipped ./...
that still shows things likebut ignores
The text was updated successfully, but these errors were encountered: