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

Stabilize tests pt2 #15779

Merged
merged 11 commits into from
Jan 30, 2025
Merged

Stabilize tests pt2 #15779

merged 11 commits into from
Jan 30, 2025

Conversation

pinzart90
Copy link
Contributor

@pinzart90 pinzart90 commented Jan 23, 2025

Purpose

More test fixes:
Removed "SplashScreen close button" tests (why? because the close button was removed from the UI)
Moved Webview2 app data location in per component folders (inside the test subfolder so that it gets cleaned up after each CICD job automatically)
Moved Serialization test data to a per process folder (so that we do not have cross contamination between parallel tests)
Switched to GUIDs in the serialization tests so that the filtering system does not get confused (test methods sometimes had the same name as dyn files)
Moved some diagnostic logging and dispatcher logic to a new utility class "TestDiagnostics" so that other tests can use them easily.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

(FILL ME IN) Brief description of the fix / enhancement. Use N/A to indicate that the changes in this pull request do not apply to Release Notes. Mandatory section

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

Copy link

github-actions bot commented Jan 23, 2025

UI Smoke Tests

Test: success. 11 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests

System.Console.WriteLine($"PID {Process.GetCurrentProcess().Id} Start test: {TestContext.CurrentContext.Test.Name}");
TestUtilities.WebView2Tag = TestContext.CurrentContext.Test.Name;

SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext());
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this because the tests don't run in the UI thread by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code was simply moved to a new utility class, but the reasons for it (when it was added way back) was that tests were running on non UI threads

Comment on lines +88 to +93
System.Console.WriteLine($"PID {id} Finished test: {name} with DispatcherOpsCounter = {DispatcherOpsCounter}");
System.Console.WriteLine($"PID {id} Finished test: {name} with WorkingSet = {currentProc.WorkingSet64}");
System.Console.WriteLine($"PID {id} Finished test: {name} with PrivateBytes = {currentProc.PrivateMemorySize64}");
System.Console.Write($"PID {id} Finished test: {name} with GC Memory Info: ");
PrettyPrint(GC.GetGCMemoryInfo());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these metrics expected to be nearly the same as before the tests started?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In a perfect world, with no memory leaks, yes

@pinzart90 pinzart90 merged commit 9cdd9f3 into master Jan 30, 2025
22 of 28 checks passed
@pinzart90 pinzart90 deleted the stabilize_tests_pt2 branch January 30, 2025 14:11
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.

3 participants