Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 21b4fbf8-d548-4f4d-a033-aa8e36080965
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 21b4fbf8-d548-4f4d-a033-aa8e36080965
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
Keep the console runner targets and TestUtilities project identities separate while sharing the common TestUtilities source definition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 21b4fbf8-d548-4f4d-a033-aa8e36080965
Use xunit.v3.assert throughout xUnit v3 builds and keep the project allowlist in shared library test infrastructure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 21b4fbf8-d548-4f4d-a033-aa8e36080965
agocke
marked this pull request as ready for review
September 17, 2026 05:57
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical build, runner, filtering, and legacy-configuration compatibility issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 4
Open (4)
What changed in this PR
This pull request pilots per-project xUnit v3 support for System.Collections.Tests while retaining xUnit v2 for special configurations.
Changes:
- Adds xUnit v3 selection and runner infrastructure.
- Provides separate v2/v3
TestUtilitiesprojects. - Updates test data access and compatibility helpers.
| File | Review |
|---|---|
src/libraries/System.Collections/tests/Generic/Comparers/EqualityComparer.Tests.cs |
Critical: v2 configurations can fail to compile due to unguarded v3 theory-data access. |
src/libraries/Directory.Build.props |
Reviewed configuration selection. |
src/libraries/Common/tests/TestUtilities/TestUtilities.XUnitV3.csproj |
Reviewed v3 utility project definition. |
src/libraries/Common/tests/TestUtilities/TestUtilities.Shared.props |
Reviewed shared utility configuration. |
src/libraries/Common/tests/TestUtilities/TestUtilities.csproj |
Reviewed v2 utility configuration. |
src/libraries/Common/tests/TestUtilities/TestEventListener.cs |
Reviewed v2/v3 output compatibility. |
src/libraries/Common/tests/TestUtilities/RandomTestCollectionOrderer.cs |
Reviewed collection ordering compatibility. |
src/libraries/Common/tests/TestUtilities/RandomTestCaseOrderer.cs |
Reviewed test-case ordering compatibility. |
eng/testing/xunit/xunit.targets |
Critical: disabling the required apphost and using dotnet exec may prevent the v3 runner from initializing. |
eng/testing/xunit/xunit.props |
Critical: excluding build assets prevents the xUnit v3 entry point from being supplied. |
eng/testing/xunit/xunit.console.v3.targets |
Critical: the trait exclusion switch is invalid and causes argument parsing failures. |
|
|
||
| <!-- Add to run argument string --> | ||
| <RunScriptCommand>$(RunScriptCommand)$(_withCategories.Replace(';', ' -trait category='))</RunScriptCommand> | ||
| <RunScriptCommand>$(RunScriptCommand)$(_withoutCategories.Replace(';', ' -trait- category='))</RunScriptCommand> |
| <!-- Excluding xunit.core/build as it enables deps file generation. --> | ||
| <PackageReference Include="xunit.core" Version="$(XUnitVersion)" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true" ExcludeAssets="build" /> | ||
| <PackageReference Include="xunit.core" Version="$(XUnitVersion)" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true" ExcludeAssets="build" Condition="'$(UseXUnitV3)' != 'true'" /> | ||
| <PackageReference Include="xunit.v3.core" Version="$(XUnitV3Version)" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true" ExcludeAssets="build" Condition="'$(UseXUnitV3)' == 'true'" /> |
|
|
||
| <Import Project="$(MSBuildThisFileDirectory)xunit.console.targets" /> | ||
| <PropertyGroup Condition="'$(UseXUnitV3)' == 'true' and '$(TestSingleFile)' != 'true'"> | ||
| <UseAppHost>false</UseAppHost> |
Comment on lines
+19
to
+20
| return this.Select(row => row.Data.Item1) | ||
| .Concat(this.Select(row => row.Data.Item2)) |
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.

This is kind of a trial ballon. My previous attempt here tried to move too much at once and got stuck in mutual incompatibilities. Instead I'm going to try to keep v2 and v3 side-by-side and move over projects one-by-one.
Summary
UseXUnitV3opt-in to the libraries test infrastructureTestUtilitiesso v2 and v3 projects can coexistSystem.Collections.Testspath to xUnit v3Note
This pull request description was generated with GitHub Copilot.