Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Upgrade to xUnit v3 #705

Copy link
Copy link

Description

@MichaelSimons
Issue body actions

Problem

The test project uses xUnit v2, which lacks proper support for conditionally skipping tests. There are 20+ tests across the repo that are only applicable on specific platforms (e.g., Windows-only windowsdesktop runtime tests). Currently these use early-return patterns with RuntimeInformation.IsOSPlatform() checks, which causes the tests to appear as passed in test results rather than skipped.

This is misleading — it inflates the passing test count and makes it harder to understand actual test coverage per platform. For example, windowsdesktop runtime tests early-return on Linux/macOS but show as green, giving the impression they ran successfully.

Additionally, PR #697 is adding platform-specific tests (Windows tar.gz extraction, Linux bash symlink preservation) that would also benefit from proper skip semantics.

Why xUnit v3

xUnit v3 has first-class support for dynamically skipping tests via Skip.If() / Skip.When() and the ITestCondition interface. Tests skipped this way appear as skipped in test results rather than passed, giving accurate visibility into what actually ran on each platform.

Scope

  • Update xunit and related package references to v3
  • Replace early-return platform checks with xUnit v3 skip APIs
  • Affected files include AkaMsLinksTests.cs (9 occurrences), GivenThatIWantToGetTheSdkLinksFromAScript.cs (8), and GivenThatIWantToInstallDotnetFromAScript.cs (3)
Reactions are currently unavailable

Metadata

Metadata

Labels

area-infrainstall-scripts infrastructure and reportinginstall-scripts infrastructure and reporting

Type

No type

Projects

Status
Done
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.