Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback to xunit v2 to get all tests running again #1147

Merged
merged 2 commits into from
Jan 1, 2025
Merged

Conversation

AArnott
Copy link
Collaborator

@AArnott AArnott commented Jan 1, 2025

The v3 upgrade caused all but 33 tests to be quietly omitted from test runs. Fixing that required opting into the new Microsoft Testing Platform.

But then a few tests failed to be discovered due to this repo's particular requirements for loading MSBuild with the Locator, causing more failures. Analyzing those failures gets harder because logs are moved or hidden.

Ultimately after working through all those issues to get at the errors behind tests and test discovery, I'm just out of ideas for how to get msbuild to load before reflection happens on the test assembly, so I'm just rolling back to xunit v2.

See also xunit/xunit#3092.

Fixes #1142

This gets all tests running again. It also changes how test logs are collected to match changes from enabling the testing platform.

However, discovery fails for some tests due to the need to execute code to load MSBuild from the SDK first, and the new xunit v3 discovery system apparently reflects before instantiating test classes, leading to these failures.
The v3 upgrade caused all but 33 tests to be quietly omitted from test runs. Fixing that required [opting into the new Microsoft Testing Platform](xunit/xunit#3107 (comment)).

But then a few tests failed to be discovered due to this repo's particular requirements for loading MSBuild with the Locator, causing more failures. Analyzing those failures gets harder because [logs are moved or hidden](xunit/xunit#3109).

Ultimately after working through all those issues to get at the errors behind tests and test discovery, I'm just out of ideas for how to get msbuild to load before reflection happens on the test assembly, so I'm just rolling back to xunit v2.

See also xunit/xunit#3092.
@AArnott AArnott force-pushed the rollbackToXunitv2 branch from f5dc766 to 081725a Compare January 1, 2025 17:55
@AArnott AArnott changed the title Rollback to xunit v2 Rollback to xunit v2 to get all tests running again Jan 1, 2025
@AArnott AArnott enabled auto-merge January 1, 2025 17:55
@AArnott AArnott merged commit 20abff5 into main Jan 1, 2025
11 checks passed
@AArnott AArnott deleted the rollbackToXunitv2 branch January 1, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix test coverage in CI/PR
1 participant