build(test): migrate from VSTest to Microsoft.Testing.Platform - #10726
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request migrates the Orleans test suite from the VSTest-based execution model to Microsoft.Testing.Platform (MTP) following the xUnit v3 migration, aligning local/CI workflows with the native .NET 10 test experience and removing unsupported mixed-runner project setups.
Changes:
- Switch test projects and infrastructure to MTP-compatible xUnit v3 packages and updated skip/trait mechanisms.
- Introduce xUnit v3
testconfig.jsonand propagate it to test outputs as$(AssemblyName).testconfig.json. - Update local scripts and CI/Azure Pipelines workflows to use MTP semantics (filter queries, TRX reporting, dump collection, minimum expected tests, etc.).
Show a summary per file
| File | Description |
|---|---|
| TestAll.cmd | Updates default filter expression format for MTP filter-query usage. |
| test/xunit.runner.json | Removes legacy xUnit runner configuration used for VSTest execution. |
| test/testconfig.json | Adds xUnit v3 test configuration (diagnostics, display, parallelization, etc.). |
| Parallel-Tests.ps1 | Migrates parallel test runner script from VSTest flags to MTP flags (filter-query/TRX/dumps/min expected). |
| global.json | Enables Microsoft.Testing.Platform as the test runner. |
| Directory.Build.targets | Copies testconfig.json into test outputs as assembly-named config for MTP/xUnit v3. |
| Directory.Build.props | Establishes a default IsTestingPlatformApplication value across the repo. |
| CONTRIBUTING.md | Updates contributor test commands to MTP-oriented dotnet test usage and filtering. |
| .github/workflows/docs.yml | Updates docs pipeline test invocations to MTP-style dotnet test arguments. |
| .azure/pipelines/templates/build.yaml | Migrates Azure Pipelines test task arguments to MTP (filter-query/TRX naming/dumps/min expected/max-parallel-modules). |
| docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj | Converts the docs tool test project to an MTP test application and adds MTP MSBuild integration. |
| docs/site/src/content/docs/tutorials-and-samples/testing-walkthrough.md | Updates documentation instructions to use MTP-style dotnet test flags. |
| docs/site/src/content/docs/grains/snippets/testing/orleans-testing/TopologyTests.cs | Updates xUnit async lifetime to ValueTask-based signatures for v3/MTP. |
| docs/site/src/content/docs/grains/snippets/testing/orleans-testing/HelloGrainTests.cs | Updates xUnit async lifetime to ValueTask-based signatures for v3/MTP. |
| docs/site/src/content/docs/grains/snippets/testing/orleans-testing/ClusterFixture.cs | Updates xUnit async lifetime to ValueTask-based signatures for v3/MTP. |
| docs/site/README.md | Updates docs solution test command to MTP flags and serialized module execution. |
| test/TestInfrastructure/TestExtensions/TestOutputHelperExtensions.cs | Moves output helper extensions to xUnit v3 namespace expectations and adjusts formatting call. |
| test/TestInfrastructure/TestExtensions/TestExtensions.csproj | Updates test infrastructure package references to xUnit v3 extensibility/assert packages. |
| test/TestInfrastructure/TestExtensions/TestCategory.cs | Migrates trait/category implementation to xUnit v3 trait APIs. |
| test/TestInfrastructure/TestExtensions/TestClusterPerTest.cs | Adds precondition tracking and updates xUnit lifetime to ValueTask; ensures preconditions are enforced on client access. |
| test/TestInfrastructure/TestExtensions/DefaultClusterFixture.cs | Updates xUnit async lifetime signatures to ValueTask. |
| test/TestInfrastructure/TestExtensions/XunitLoggerProvider.cs | Updates xUnit output helper usage namespace for v3. |
| test/TestInfrastructure/TestExtensions/TestUtils.cs | Migrates skip behavior to xUnit v3 SkipException APIs. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/Orleans.TestingHost.Tests.csproj | Switches to xunit.v3.mtp-v2 package for MTP execution. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/TestClusterTests.cs | Updates cancellation behavior to use TestContext.Current.CancellationToken and ValueTask lifetimes. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/SiloDisposalLeakTests.cs | Adds TestContext cancellation token to timeout delays to respect runner cancellation. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/HostShutdownCallbackTests.cs | Adds TestContext cancellation token to timeout delays to respect runner cancellation. |
| test/Transactions/Orleans.Transactions.Tests/Orleans.Transactions.Tests.csproj | Switches Orleans.Transactions.Tests to xunit.v3.mtp-v2. |
| test/Transactions/Orleans.Transactions.Tests/TransactionOverloadDetectorTests.cs | Removes SkippableTheory usage in favor of xUnit v3 core attributes. |
| test/Transactions/Orleans.Transactions.Tests/Runners/TransactionAttributionTestRunner.cs | Removes obsolete Abstractions import for xUnit v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/TransactionConcurrencyTests.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/TransactionAttributionTest.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/TocGoldenPathMemoryTests.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/TocFaultTransactionMemoryTests.cs | Cleans up file header/imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/SkewedClockGoldenPathTransactionMemoryTests.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/GrainFaultTransactionMemoryTests.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/GoldenPathTransactionMemoryTests.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/ExclusiveLockTransactionMemoryTests.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/ConsistencyTests.cs | Removes obsolete Abstractions import for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/ConsistencySkewedClockTests.cs | Removes obsolete Abstractions import for v3. |
| test/Transactions/Orleans.Transactions.Tests/Memory/BankTransferFaultInjectionMemoryTests.cs | Removes obsolete Abstractions import for v3. |
| test/Transactions/Orleans.Transactions.Tests/Disabled/DisabledTransactionsTests.cs | Updates xUnit imports for v3. |
| test/Transactions/Orleans.Transactions.DynamoDB.Test/Orleans.Transactions.DynamoDB.Test.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Transactions/Orleans.Transactions.DynamoDB.Test/TestFixture.cs | Migrates skip behavior to xUnit v3 SkipException APIs. |
| test/Transactions/Orleans.Transactions.DynamoDB.Test/*.cs | Removes obsolete Abstractions imports for v3 across DynamoDB transaction tests. |
| test/Transactions/Orleans.Transactions.Azure.Test/Orleans.Transactions.Azure.Test.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Transactions/Orleans.Transactions.Azure.Test/*.cs | Removes obsolete Abstractions imports and migrates SkippableFact usage to xUnit v3. |
| test/Orleans.Streaming.Tests/Orleans.Streaming.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Orleans.Streaming.Tests/StreamingTests/*.cs | Removes obsolete Abstractions imports; migrates SkippableFact usage and async lifetimes to v3 patterns. |
| test/Orleans.Serialization.UnitTests/Orleans.Serialization.UnitTests.csproj | Switches to xUnit v3 MTP packages; updates Verify package to v3-compatible variant. |
| test/Orleans.Serialization.UnitTests/*.cs | Removes obsolete Abstractions imports for v3 across serializer tests. |
| test/Orleans.Serialization.FSharp.Tests/Orleans.Serialization.FSharp.Tests.fsproj | Switches F# tests to xunit.v3.mtp-v2 and normalizes project references formatting. |
| test/Orleans.Runtime.Tests/Orleans.Runtime.Tests.csproj | Switches to xunit.v3.mtp-v2 and sets StartupObject for MTP/xUnit entrypoint dispatch. |
| test/Orleans.Runtime.Tests/Program.cs | Adds dispatch to auto-generated xUnit entry point when invoked as a test host. |
| test/Orleans.Runtime.Tests/**/*.cs | Migrates SkippableFact usage, adopts TestContext cancellation tokens, removes Abstractions imports, and updates lifetimes for v3. |
| test/Orleans.Runtime.Internal.Tests/Orleans.Runtime.Internal.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Orleans.Runtime.Internal.Tests/**/*.cs | Migrates SkippableFact usage, removes Abstractions imports, and updates async lifetimes for v3. |
| test/Orleans.Reminders.Tests/Orleans.Reminders.Tests.csproj | Switches to xunit.v3.mtp-v2. |
| test/Orleans.Reminders.Tests/**/*.cs | Updates async lifetimes to ValueTask where required by xUnit v3. |
| test/Orleans.Placement.Tests/Orleans.Placement.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Orleans.Placement.Tests/**/*.cs | Removes Abstractions imports and updates async lifetime signatures for v3. |
| test/Orleans.Persistence.TestKit.Tests/Orleans.Persistence.TestKit.Tests.csproj | Switches to xunit.v3.mtp-v2. |
| test/Orleans.Journaling.Tests/Orleans.Journaling.Tests.csproj | Switches to xunit.v3.mtp-v2 and updates Verify package to v3-compatible variant. |
| test/Orleans.Journaling.Tests/*.cs | Updates skip logic to xUnit v3-style Assert.SkipWhen calls. |
| test/Orleans.Journaling.Json.Tests/Orleans.Journaling.Json.Tests.csproj | Switches to xunit.v3.mtp-v2 and updates Verify package to v3-compatible variant. |
| test/Orleans.GrainDirectory.Tests/Orleans.GrainDirectory.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Orleans.GrainDirectory.Tests/**/*.cs | Removes Abstractions imports for v3. |
| test/Orleans.EventSourcing.Tests/Orleans.EventSourcing.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Orleans.DurableJobs.Tests/Orleans.DurableJobs.Tests.csproj | Switches to xunit.v3.mtp-v2. |
| test/Orleans.DependencyInjection.Tests/Orleans.DependencyInjection.Tests.csproj | Switches to xunit.v3.mtp-v2. |
| test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/Orleans.Dashboard.UnitTests.csproj | Switches to xunit.v3.mtp-v2. |
| test/Orleans.Core.Tests/Orleans.Core.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Orleans.Core.Tests/**/*.cs | Removes Abstractions imports and updates custom DataAttribute implementation for xUnit v3. |
| test/Orleans.Connections.Security.Tests/Orleans.Connections.Security.Tests.csproj | Switches to xunit.v3.mtp-v2. |
| test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj | Adds Microsoft.Testing.Platform.MSBuild and migrates Verify package usage to v3. |
| test/Orleans.BroadcastChannel.Tests/Orleans.BroadcastChannel.Tests.csproj | Switches to xunit.v3.mtp-v2. |
| test/Orleans.Analyzers.Tests/Orleans.Analyzers.Tests.csproj | Switches to xunit.v3.mtp-v2 and removes Microsoft.NET.Test.Sdk usage. |
| test/Grains/TestInternalGrains/TestInternalGrains.csproj | Updates xUnit assert package to v3. |
| test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP (and relies on shared/runtime test project changes). |
| test/Extensions/Orleans.Streaming.NATS.Tests/*.cs | Migrates SkippableFact usage and skip exceptions to xUnit v3. |
| test/Extensions/Orleans.Streaming.Kinesis.Tests/Orleans.Streaming.Kinesis.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Streaming.Kinesis.Tests/*.cs | Migrates SkippableFact usage, skip exceptions, and async lifetimes to xUnit v3 patterns. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/Orleans.Streaming.EventHubs.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/**/*.cs | Removes Abstractions imports and migrates SkippableFact usage to xUnit v3. |
| test/Extensions/Orleans.Reminders.Firestore.Tests/Orleans.Reminders.Firestore.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Redis.Tests/Orleans.Redis.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage and migrates Verify to v3-compatible variant. |
| test/Extensions/Orleans.Redis.Tests/**/*.cs | Migrates SkippableFact usage and adjusts disposal/init paths to honor PreconditionsMet. |
| test/Extensions/Orleans.Persistence.Firestore.Tests/Orleans.Persistence.Firestore.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Persistence.Firestore.Tests/*.cs | Updates xUnit imports for v3. |
| test/Extensions/Orleans.GrainDirectory.Firestore.Tests/Orleans.GrainDirectory.Firestore.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.DurableJobs.AzureStorage.Tests/Orleans.DurableJobs.AzureStorage.Tests.csproj | Switches to xunit.v3.mtp-v2 and sets StartupObject for entrypoint dispatch. |
| test/Extensions/Orleans.DurableJobs.AzureStorage.Tests/Program.cs | Adds dispatch to auto-generated xUnit entry point when invoked as a test host. |
| test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Cosmos.Tests/*.cs | Migrates SkippableFact usage and skip exceptions to xUnit v3. |
| test/Extensions/Orleans.Clustering.ZooKeeper.Tests/Orleans.Clustering.ZooKeeper.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Clustering.ZooKeeper.Tests/*.cs | Migrates SkippableFact usage and skip exceptions to xUnit v3. |
| test/Extensions/Orleans.Clustering.Firestore.Tests/Orleans.Clustering.Firestore.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Clustering.Firestore.Tests/*.cs | Migrates SkippableFact usage to xUnit v3. |
| test/Extensions/Orleans.Clustering.Consul.Tests/Orleans.Clustering.Consul.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Clustering.Consul.Tests/*.cs | Migrates skip exception to xUnit v3. |
| test/Extensions/Orleans.Clustering.Cassandra.Tests/Orleans.Clustering.Cassandra.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Clustering.Cassandra.Tests/*.cs | Removes Abstractions imports for v3. |
| test/Extensions/Orleans.Azure.Tests/Orleans.Azure.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.Azure.Tests/**/*.cs | Migrates SkippableFact usage, updates skip exception handling, and updates lifetimes to ValueTask where needed. |
| test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj | Removes Microsoft.NET.Test.Sdk usage under MTP. |
| test/Extensions/Orleans.AWS.Tests/**/*.cs | Migrates SkippableFact usage and skip exceptions to xUnit v3. |
| test/Extensions/Orleans.AdoNet.Tests/Orleans.AdoNet.Tests.csproj | Switches to xunit.v3.mtp-v2 and removes VSTest-only dependencies. |
| test/Extensions/Orleans.AdoNet.Tests/**/*.cs | Migrates skip logic (Skip.If*) to Assert.SkipWhen/Unless and updates lifetimes to ValueTask. |
| test/Extensions/Google/GoogleEmulatorHost.cs | Migrates silent skip to an explicit xUnit v3 SkipException reason. |
| test/Benchmarks/Benchmarks.csproj | Switches to xunit.v3.mtp-v2 and sets StartupObject; removes coverlet collector reference. |
| test/Benchmarks/Program.cs | Adds dispatch to auto-generated xUnit entry point when invoked as a test host. |
| test/Benchmarks/Serialization/Comparison/ArraySerializeBenchmark.cs | Updates MessagePack serialize call to pass explicit CancellationToken. |
| test/Benchmarks.AdoNet/Benchmarks.AdoNet.csproj | Disables xUnit auto-generated entry point for benchmark host project. |
| src/Orleans.Transactions.TestKit.xUnit/Orleans.Transactions.TestKit.xUnit.csproj | Updates xUnit package references to v3 equivalents and adds a Using Include="Xunit". |
| src/Orleans.Transactions.TestKit.xUnit/*.cs | Removes Abstractions imports and migrates SkippableFact/Theory usage to xUnit v3 attributes. |
| src/Orleans.Serialization.TestKit/Orleans.Serialization.TestKit.csproj | Updates xUnit package references to v3 equivalents and adds a Using Include="Xunit". |
| src/Orleans.Serialization.TestKit/*.cs | Removes Abstractions imports and updates output helper namespace usage for xUnit v3. |
| src/Orleans.Persistence.TestKit/Orleans.Persistence.TestKit.csproj | Adds a PrivateAssets System.Text.Json pin for test kit usage under updated test platform constraints. |
| src/Orleans.Persistence.TestKit/GrainStorageTestFixture.cs | Updates xUnit async lifetime signatures to ValueTask. |
| src/api/Orleans.Persistence.TestKit/Orleans.Persistence.TestKit.cs | Updates generated API surface for ValueTask-based lifetime changes. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 300/444 changed files
- Comments generated: 0
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c04920cb-6574-4433-a00a-e91c347199eb
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c04920cb-6574-4433-a00a-e91c347199eb
527d508 to
c203124
Compare
There was a problem hiding this comment.
Review details
Suppressed comments (7)
test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj:13
- This NATS test project uses xUnit but has no xUnit package reference in the project file. Add
xunit.v3.mtp-v2so it builds/runs under MTP.
test/Extensions/Orleans.Reminders.Firestore.Tests/Orleans.Reminders.Firestore.Tests.csproj:11 - This Firestore reminders test project contains xUnit tests but doesn't reference any xUnit package. Add
xunit.v3.mtp-v2so it compiles/runs under Microsoft.Testing.Platform.
test/Extensions/Orleans.Persistence.Firestore.Tests/Orleans.Persistence.Firestore.Tests.csproj:12 - This Firestore persistence test project uses xUnit but doesn't reference any xUnit package. Add
xunit.v3.mtp-v2so it builds and tests can be discovered.
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(SourceRoot)src\Google\Orleans.Persistence.Firestore\Orleans.Persistence.Firestore.csproj" />
<ProjectReference Include="$(SourceRoot)src\Orleans.Persistence.TestKit\Orleans.Persistence.TestKit.csproj" PrivateAssets="all" />
<ProjectReference Include="$(SourceRoot)test\Orleans.Runtime.Internal.Tests\Orleans.Runtime.Internal.Tests.csproj" />
</ItemGroup>
test/Extensions/Orleans.GrainDirectory.Firestore.Tests/Orleans.GrainDirectory.Firestore.Tests.csproj:11
- This Firestore grain directory test project contains xUnit tests but doesn't reference any xUnit package. Add
xunit.v3.mtp-v2.
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(SourceRoot)src\Google\Orleans.GrainDirectory.Firestore\Orleans.GrainDirectory.Firestore.csproj" />
<ProjectReference Include="$(SourceRoot)test\Orleans.Runtime.Tests\Orleans.Runtime.Tests.csproj" />
</ItemGroup>
test/Extensions/Orleans.Clustering.ZooKeeper.Tests/Orleans.Clustering.ZooKeeper.Tests.csproj:11
- This ZooKeeper clustering test project uses xUnit but has no xUnit package reference. Add
xunit.v3.mtp-v2so it builds/runs under MTP.
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(SourceRoot)src\Orleans.Clustering.ZooKeeper\Orleans.Clustering.ZooKeeper.csproj" />
<ProjectReference Include="$(SourceRoot)test\Orleans.Runtime.Internal.Tests\Orleans.Runtime.Internal.Tests.csproj" />
</ItemGroup>
test/Transactions/Orleans.Transactions.DynamoDB.Test/Orleans.Transactions.DynamoDB.Test.csproj:14
- This test project contains xUnit tests but has no xUnit package reference. Add
xunit.v3.mtp-v2so it builds/runs under Microsoft.Testing.Platform.
test/Transactions/Orleans.Transactions.Azure.Test/Orleans.Transactions.Azure.Test.csproj:15 - This Azure transactions test project contains xUnit tests but doesn't reference any xUnit package. Add
xunit.v3.mtp-v2so it compiles and runs under MTP.
- Files reviewed: 63/63 changed files
- Comments generated: 16
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c04920cb-6574-4433-a00a-e91c347199eb
There was a problem hiding this comment.
Review details
Suppressed comments (3)
Previously missed (2) — in code that hasn't changed since the last review.
Parallel-Tests.ps1:84
- The parallel test harness runs multiple
dotnet testjobs concurrently, but this command line no longer limits MTP's per-process module parallelism. Without--max-parallel-test-modules 1, each job can execute multiple test modules in parallel (default is typically CPU-count), which can lead to severe oversubscription and instability on CI/dev boxes.
$cmdLine = 'test --no-build --configuration "' + $env:BuildConfiguration + '" --filter-query ' + $testFilter + ' --minimum-expected-tests 1 --report-trx --crashdump --crashdump-type Full --hangdump --hangdump-timeout 10m --hangdump-type Full'
docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting.MSTest/Sample.OrleansTesting.MSTest.csproj:10
- This project is intended to be a Microsoft.Testing.Platform-based test application (it’s added to Docs.slnx and the repo switches
dotnet testto MTP via global.json), but it doesn't opt into the MTP runner properties used elsewhere in the repo. Without setting these, the project may not run correctly underdotnet testwhen the MTP runner is enabled.
This issue also appears on line 13 of the same file.
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting.MSTest/Sample.OrleansTesting.MSTest.csproj:17
- This MSTest sample opts into
EnableMSTestRunner, but it doesn't referenceMicrosoft.Testing.Platform.MSBuild, which is the MSBuild integration used by the other MTP test apps in this PR. Adding it makes the sample consistent with the xUnit MTP sample and reduces the chance thatdotnet testcan't execute it when the repo is configured for MTP.
<PackageReference Include="Microsoft.Orleans.TestingHost" Version="10.2.2" />
<PackageReference Include="MSTest.TestAdapter" Version="4.3.3">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MSTest.TestFramework" Version="4.3.3" />
- Files reviewed: 63/63 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c04920cb-6574-4433-a00a-e91c347199eb
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting.MSTest/Sample.OrleansTesting.MSTest.csproj:18
- This new MSTest sample is intended to be a Microsoft.Testing.Platform test application (per the PR description and the xUnit sample), but it does not set
IsTestingPlatformApplication/UseMicrosoftTestingPlatformRunnerand it does not referenceMicrosoft.Testing.Platform.MSBuild. With the repo-wide switch to the MTP runner,dotnet testis likely to fall back to VSTest behavior or fail to discover/run these tests consistently.
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableMSTestRunner>true</EnableMSTestRunner>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
- Files reviewed: 63/63 changed files
- Comments generated: 0 new
- Review effort level: Lite
This moves the Orleans test suite onto Microsoft.Testing.Platform after the xUnit v3 migration, avoiding an unsupported mix of VSTest and MTP projects and adopting the native .NET 10 test experience.
The branch is rebased directly onto
mainafter #10722 merged.Changes
global.jsonand xUnit v3's MTP v2 packages.testconfig.jsonfiles.Azure DevOps continues to publish the generated TRX files using
testResultsFormat: VSTest, which is Azure Pipelines' identifier for the TRX format rather than the test runner.Microsoft Reviewers: Open in CodeFlow