Migrate Microsoft.TemplateEngine.IDE.IntegrationTests to MSTest.Sdk on MTP#54760
Migrate Microsoft.TemplateEngine.IDE.IntegrationTests to MSTest.Sdk on MTP#54760Evangelink wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates Microsoft.TemplateEngine.IDE.IntegrationTests from xUnit v3 to MSTest.Sdk on Microsoft.Testing.Platform (MTP), aligning it with the patterns used in the referenced migrations (#54758 / #54759).
Changes:
- Switch the test project to
MSTest.Sdkand convert xUnit attributes/assertions to MSTest equivalents. - Replace xUnit logging/fixture patterns with MSTest
TestContext+ aTestContextLoggeradapter. - Remove Verify.xUnit fixture plumbing and replace the few remaining approval-style checks with a minimal local snapshot comparer.
Show a summary per file
| File | Description |
|---|---|
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/Microsoft.TemplateEngine.IDE.IntegrationTests.csproj | Switch project SDK to MSTest.Sdk and remove xUnit/Verify package references. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/GlobalUsings.cs | Add explicit aliases for MSTest Assert/TestContext to avoid ambiguity with transitive xUnit types. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/TestContextLogger.cs | New ILogger adapter forwarding logs into MSTest per-test output. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/SnapshotComparer.cs | New minimal approval-file comparer replacing prior Verify usage in this project. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/VerifyTestCollection.cs | Remove xUnit collection definition (no longer applicable). |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/VerifySettingsFixture.cs | Remove xUnit Verify fixture initialization (no longer applicable). |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/SnapshotTests.cs | Convert to MSTest [TestClass]/[TestMethod], replace xUnit output helper with TestContextLogger, update cancellation token usage. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/LocalizationTests.cs | Convert to MSTest; preserve sequential execution via [DoNotParallelize]; update asserts and cancellation tokens. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/BasicTests.cs | Convert to MSTest; replace Verify calls with SnapshotComparer; replace fixture with static Lazy<PackageManager>. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/TemplatePackagesTests.cs | Convert to MSTest; replace fixture with static Lazy<PackageManager>; update cancellation tokens/asserts. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/End2EndTests.cs | Convert to MSTest; replace Verify calls with SnapshotComparer; update cancellation tokens/asserts and skip -> [Ignore]. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/ConfigurationTests.cs | Convert to MSTest and update cancellation token usage/asserts. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/FileRenameTests.cs | Convert to MSTest + DynamicData-based data-driven tests; replace fixture with static Lazy<PackageManager>. |
Copilot's findings
- Files reviewed: 13/13 changed files
- Comments generated: 4
| [MemberData(nameof(Get_FileRename_TestData))] | ||
| internal async Task GetCreationEffectsTest(string templateName, string parameters, MockCreationEffects expectedResult) | ||
| [TestMethod] | ||
| [DynamicData(nameof(Get_FileRename_TestData))] |
| [MemberData(nameof(Get_FileRename_TestData))] | ||
| internal async Task CreateTest(string templateName, string parameters, MockCreationEffects expectedResult) | ||
| [TestMethod] | ||
| [DynamicData(nameof(Get_FileRename_TestData))] |
| [MemberData(nameof(Get_FileRename_TestData))] | ||
| internal async Task GetCreationEffectsTest_Package(string templateName, string parameters, MockCreationEffects expectedResult) | ||
| [TestMethod] | ||
| [DynamicData(nameof(Get_FileRename_TestData))] |
| [MemberData(nameof(Get_FileRename_TestData))] | ||
| internal async Task CreateTest_Package(string templateName, string parameters, MockCreationEffects expectedResult) | ||
| [TestMethod] | ||
| [DynamicData(nameof(Get_FileRename_TestData))] |
|
Closing this PR. Migration is blocked by a fundamental incompatibility: CI evidence (build 1462864) — every Migrating this project safely requires either:
None of these are safe surgical changes for this PR, so closing for now. Re-opening requires the upstream tool change first. |
Migrates the IDE.IntegrationTests project from xUnit v3 to MSTest.Sdk on Microsoft.Testing.Platform. Follows the same pattern as #54758 and #54759.
cc @Evangelink