testing: allow creation of subtests #9268
Closed
Labels
Milestone
Comments
Marcel said he is working on something along these lines. |
It's also easy enough to convert a table-driven test into a set of individual tests, along the lines of: type testFoo struct {...} |
Closing in favor of #12166 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem: When writing tests that take >3 minutes each, the tests should be parallelized. If your tests are also amenable to being written in a table-driven format, you have to resort to goroutines to make things parallel (rather than
t.Parallel()
). If you do that, then your logs get interleaved, andgo test run .*
can't help you out to isolate particular failures, and you lose the benefits oft.Parallel()
, like setting number of parallel lines at CLI, ensuring non-parallel ones don't run with it...Solution: A proposed solution discussed involves the ability for tests to create their own subtests.
The text was updated successfully, but these errors were encountered: