Refactors UI test setup and updates dependencies#4058
Merged
Conversation
Centralizes remote app startup and test recorder management in XamlTestExecutor, removing boilerplate from individual tests; marks long-running tests as explicit and enables TUnit parallel limiting.
Upgrades core packages including TUnit, System.CommandLine, and XAMLTest. Refactors `CommandLineOptions` for `System.CommandLine` API updates. Adapts TUnit assertion extensions and test execution context usage. Adds `ModuleInitializerAttribute` for NET472 support.
Removes explicit `recorder.Success()` calls from UI tests, completing the centralization of test recorder management introduced by the `XamlTestExecutor` refactor. Cleans up unused package versions and test dependencies. Addresses nullable warnings and removes Byte Order Mark (BOM) for improved code hygiene.
Removes redundant ``, ``, and Microsoft Testing Platform-specific properties from test `.csproj` files. This cleans up project definitions, aligning them with current SDK-style project practices and the existing TUnit test infrastructure.
Defines `Microsoft.Testing.Platform` as the solution-wide test runner in `global.json`. This enables the removal of specific runner properties from individual test `.csproj` files, reducing redundancy and simplifying project configurations.
Removes redundant `--blame-crash` and `--logger GitHubActions` arguments from the `dotnet test` command. These concerns are now implicitly handled by the centralized test runner configuration, further simplifying the build artifact workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enhances the test infrastructure by centralizing UI test setup and teardown logic, leading to cleaner and more maintainable test code.
XamlTestExecutorto automate the management of test application (IApp) instances andTestRecorderlifecycles for UI tests, removing repetitive boilerplate from individual test methods.TUnitto a new major version,Microsoft.NET.Test.Sdk, andGitHubActionsTestLogger. Also addsSystem.Net.HttpandSystem.Text.RegularExpressionspackage references.IsCloseToExtensionsto align with the updated TUnit assertion API.[Skip]ped to[Explicit], allowing them to be run intentionally without being part of default test runs.ModuleInitializerAttributefor .NET Framework 4.7.2, enabling support for module initialization patterns on older framework versions.TestRecorderinstantiation/disposal and obsoleteusingdirectives.GitHubActionsTestLoggerpackage references from test projects.defaultkeyword usage in some tests for improved type clarity in assertion checks.