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

feat: update test sidebar icon coloring with test results and add test coverage #3381

Merged
merged 6 commits into from
Jul 9, 2021

Conversation

violetyao
Copy link
Contributor

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 monitoring testResultFileWatcher.onDidChange and using test-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 have runId from running tests asynchronously and thus do not need to monitor testResultFileWatcher.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.

Apex Class Filewatcher Async
AccountServiceLayer_Tests 4.72s 13.51s
AccountTriggerHandler_Tests 45.10s 53.77s
ApiServiceRecipes_Tests 2.97s 5.16s
AtFutureReceipes_Tests 2.71s 3.78s
AuraEnabledReciepes_Tests 5.33s 13.26s

What issues does this PR fix or reference?

#3059, @W-8716138@

Functionality Before

Test results did not update icon colors.
Screen Shot 2021-07-01 at 8 45 10 AM

Functionality After

Test results update icon colors.
Screen Shot 2021-07-01 at 8 45 57 AM

@violetyao violetyao requested a review from a team as a code owner July 1, 2021 16:08
@violetyao violetyao requested a review from randi274 July 1, 2021 16:08
Copy link
Collaborator

@AnanyaJha AnanyaJha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@violetyao violetyao merged commit 3fac758 into develop Jul 9, 2021
@violetyao violetyao deleted the violet/replay-debugger-sidebar-filewatcher branch July 9, 2021 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants