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

[Draft] [WinUI3] Window cleanup after test runs #4415

Draft
wants to merge 1 commit into
base: winui
Choose a base branch
from

Conversation

marcelwgn
Copy link
Contributor

Fixes

When running the UI tests, the test apps window stays open and do not get cleaned up. There are two ways a window get's "leaked" when running tests from Visual Studio:

  1. Test discovery starts app but does not close it
  2. Test run finished (also does not close app)

This PR tries to address this, in it's current form, the second case would be fixed. Point one still occurs.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Two windows spawn when running tests through Visual Studio, both stay open after test run finished.

What is the new behavior?

One window stays open, the other get's closed.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • New component
    • Pull Request has been submitted to the documentation repository instructions. Link:
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
    • If control, added to Visual Studio Design project
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

Case

@ghost
Copy link

ghost commented Dec 5, 2021

Thanks chingucoding for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker and azchohfi December 5, 2021 21:15
@azchohfi
Copy link
Contributor

azchohfi commented Dec 6, 2021

Is this only with TAEF or MSTest or both?

@marcelwgn
Copy link
Contributor Author

I think VS is running the MSTest version, so MSTest.

@azchohfi
Copy link
Contributor

azchohfi commented Dec 6, 2021

Oh, my bad, this is the UnitTests, not the UI tests. I'll take a look at what might be happening. This should have been like this already.

@marcelwgn
Copy link
Contributor Author

From what I can tell, the WinUI app does not realize that "it is done" or MSTest is not telling it that. UWP Apps don't seem to have that problem for some reason.

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.

2 participants