feat: update test sidebar icon coloring with test results and add test coverage #3381
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The debug & run test action did not update the test sidebar with results as expected. This PR adds this functionality so that the results are similar to running the test directly.
Synchronous test runs do not have
runId
. This PR adds this functionality by monitoringtestResultFileWatcher.onDidChange
and usingtest-result.json
generated by synchronous test runs.We discussed the possibility of running tests asynchronously. Code of the asynchronous version is at
violet/replay-debugger-sidebar-async
branch. Let me know if we also want a PR for the asynchronous version! I'm currently leaning towards the file watcher approach. Although we haverunId
from running tests asynchronously and thus do not need to monitortestResultFileWatcher.onDidChange
, its performance is not as good as the performance of the file watcher approach. In the table below, I recorded statistics for five sample apex classes from apex-recipes. The numbers are averages of three runs.What issues does this PR fix or reference?
#3059, @W-8716138@
Functionality Before
Test results did not update icon colors.
Functionality After
Test results update icon colors.