Migrate Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests to MSTest.Sdk on MTP#54862
Open
Evangelink wants to merge 14 commits into
Open
Migrate Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests to MSTest.Sdk on MTP#54862Evangelink wants to merge 14 commits into
Evangelink wants to merge 14 commits into
Conversation
…n MTP Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…undation' into evangelink/mstest-mtp-blazoraot-tests
Resolves conflicts in StaticWebAssets test files and converts newly merged xUnit-style tests/attributes from main to MSTest: - [Fact] -> [TestMethod]; added [TestClass] (+ [DoNotParallelize] for CWD-mutating MT tests) - [PlatformSpecificFact(TestPlatforms.X)] / [PlatformSpecific(...)] -> [TestMethod] + [OSCondition(...)] - [WindowsOnlyRequiresMSBuildVersion(v)] -> [OSCondition(OperatingSystems.Windows)] + [RequiresMSBuildVersion(v)] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
1 similar comment
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
…-blazoraot-tests # Conflicts: # test/Microsoft.NET.Sdk.StaticWebAssets.Tests/StaticWebAssets/ComputeReferenceStaticWebAssetItemsTest.cs
Three files merged in from main still used xUnit constructs after the project moved to MSTest.Sdk, breaking the build: - GenerateStaticWebAssetsPropsFileMultiThreadingTest - StaticWebAssetsGeneratePackManifestMultiThreadingTest - TypeScriptIntegrationTest Convert [Fact] to [TestMethod], add [TestClass]/[DoNotParallelize], implement the now-abstract RestoreNugetPackagePath, replace the ITestOutputHelper ctor with the parameterless MSTest pattern, and use TestContext.CancellationToken. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 22, 2026
Open
This test file was added on main by dotnet#54704 after this branch migrated Microsoft.NET.Sdk.StaticWebAssets.Tests to MSTest.Sdk, so the merge reintroduced xUnit [Fact] usage that no longer compiles (CS0246 FactAttribute/Fact). Convert it to [TestClass]/[TestMethod] with [DoNotParallelize], matching the sibling MultiThreading tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 22, 2026
Member
Author
|
/ba-g unrelated test issues |
JeremyKuhne
requested changes
Jun 22, 2026
The migration tooling inserted large numbers of blank lines throughout the StaticWebAssets/Blazor test files. Restore the original blank-line layout from main while preserving all migrated content (xUnit->MSTest attribute swaps, usings, [TestClass]). No non-blank content changes; reduces the diff by ~50k spurious lines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…onErrorDetectorTests
A merge with main reintroduced the xUnit [Fact] version of this file while the
Microsoft.DotNet.Cli.Utils.Tests project is MSTest.Sdk, causing CS0246
('Fact' could not be found) and breaking every build leg. Restore the
[TestClass]/[TestMethod] version that exists on main.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The xUnit project disabled parallelization assembly-wide via [assembly: CollectionBehavior(DisableTestParallelization = true)]. The MSTest migration dropped that and inherited the repo-wide MethodLevel default, so methods now run in parallel. These integration tests are not parallel-safe: many methods in a class share a fixed test asset directory (helpers use [CallerMemberName]) and several task tests mutate the process-global current directory via Directory.SetCurrentDirectory, producing file-in-use, file-already-exists, missing-metadata and deleted-cwd (GetCwd) races. Setting MSTestParallelizeScope=None emits [assembly: DoNotParallelize], restoring the original fully-serialized semantics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve conflicts in test files migrated to MSTest. Both main and this branch performed the equivalent xUnit->MSTest migration, so conflicts were limited to whitespace, attribute ordering, and per-test [DoNotParallelize] annotations. This branch fully serializes the StaticWebAssets test assembly via MSTestParallelizeScope=None, making main's granular [DoNotParallelize] attributes redundant, so the branch's versions were kept. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Migrates
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Testsfrom xUnit to MSTest.Sdk on MTP.Depends on #54845 (foundation) and #54861 (BlazorWebAssembly.Tests) — it link-compiles
WasmPublishIntegrationTestBase/BootJsonData/ServiceWorkerAssertfrom the Blazor tests, so this branch is stacked on that one. Merge after both. Compiles clean locally.