-
Notifications
You must be signed in to change notification settings - Fork 39.1k
Testing: non-error output #129201
Copy link
Copy link
Closed
Labels
api-finalizationfeature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsiderstestingBuilt-in testing supportBuilt-in testing supportverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Metadata
Metadata
Assignees
Labels
api-finalizationfeature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsiderstestingBuilt-in testing supportBuilt-in testing supportverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
I discussed this with @connor4312 on #122208 (comment), but now I have a concrete need.
Go has benchmarks. Benchmarks (in Go) are defined and run in much the same way that tests are. Tests are defined with
func TestXxx(*testing.T)and benchmarks are defined withfunc BenchmarkXxx(*testing.B); tests are run withgo test -run='^TestXxx$'and benchmarks are run withgo test -bench='^BenchmarkXxx$'. So it is natural for benchmarks to be exposed along side tests in the testing API.Given a benchmark:
Running this benchmark will produce something like the following:
For running benchmarks with the testing API to be meaningful, the user needs to see the results of the benchmark (the second BenchmarkFoo line). Previously, I could attach an info message to a test that passed. That capability was removed in the finalized testing API.