Skip to content
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

testing: tie test output correctly to runs, rework ui accordingly #180746

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

connor4312
Copy link
Member

Previously, test output was handled for an entire TestRunRequest into
a single stream. This didn't match what the public API implied, nor what
the real intentions were.

This makes output be stored correctly on a per-test run (called "tasks"
internally). It changes the order of the Test Results view so that tests
nested under their task, and also improves some of the tree handling
there to update nodes more specifically.

Clicking on the "terminal" button in the test view continues to show
output from the last test run request, but if there were multiple tasks,
the user is asked to choose which they want to view output for.

Finally I removed some old unused code that dealt with storing test
results on disk, which we no longer do, and moved to a simpler interface
instead.

Fixes #180041

This is an old artifact that caused problems in the issue this fixes #180041

When we get a new 'task' from a test run request, we automatically
marked all tests as being enqueued with it. However, tests are now lazily
added to the test run states, so this would only affect tests that
_already_ had their state set to something (e.g. in another task). And
therefore it was also ineffective for its original purpose of marking
all included tests as being Queued, since extensions have had to do that
themselves anyway.

So just remove this code! Also, adjust priorities such that "skipped"
priorities are shown above unset ones.
Previously, test output was handled for an entire TestRunRequest into
a single stream. This didn't match what the public API implied, nor what
the real intentions were.

This makes output be stored correctly on a per-test run (called "tasks"
internally). It changes the order of the Test Results view so that tests
nested under their task, and also improves some of the tree handling
there to update nodes more specifically.

Clicking on the "terminal" button in the test view continues to show
output from the last test run request, but if there were multiple tasks,
the user is asked to choose which they want to view output for.

Finally I removed some old unused code that dealt with storing test
results on disk, which we no longer do, and moved to a simpler interface
instead.

Fixes #180041
@connor4312 connor4312 enabled auto-merge (squash) April 24, 2023 19:46
@connor4312 connor4312 self-assigned this Apr 24, 2023
@vscodenpa vscodenpa added this to the April 2023 milestone Apr 24, 2023
@connor4312 connor4312 merged commit 6a283f7 into main Apr 24, 2023
@connor4312 connor4312 deleted the connor4312/issue180041 branch April 24, 2023 22:06
@github-actions github-actions bot locked and limited conversation to collaborators Jun 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension Test API - run results are not correctly updated when using multiple vscode.TestRun objects
3 participants