Skip to content

Update testing and coverage to xUnit v3#1616

Merged
clairernovotny merged 1 commit intomainfrom
xunit3
Oct 12, 2025
Merged

Update testing and coverage to xUnit v3#1616
clairernovotny merged 1 commit intomainfrom
xunit3

Conversation

@clairernovotny
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings October 12, 2025 00:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the Humanizer project's test framework from xUnit v2 to xUnit v3, modernizing the testing infrastructure and adopting the Microsoft Testing Platform.

  • Updates test framework dependencies from xUnit v2 to v3 with Microsoft Testing Platform support
  • Modernizes test configuration by replacing xunit.runner.json with testconfig.json format
  • Updates code coverage tooling from coverlet.collector to Microsoft.Testing.Extensions.CodeCoverage

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/dotnet.config Configures Microsoft Testing Platform as the test runner
src/Humanizer.Tests/xunit.runner.json Removes legacy xUnit v2 configuration file
src/Humanizer.Tests/testconfig.json Adds new xUnit v3 configuration with coverage settings
src/Humanizer.Tests/UseCultureAttribute.cs Updates BeforeAfterTestAttribute methods to match xUnit v3 API
src/Humanizer.Tests/Humanizer.Tests.csproj Updates project to use xUnit v3 packages and Microsoft Testing Platform
src/Directory.Packages.props Updates package versions for xUnit v3 and Microsoft Testing Platform
src/CodeCoverage.runsettings Removes legacy coverage configuration file
azure-pipelines.yml Updates test and coverage report generation commands

Comment on lines +3 to 4


Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove redundant empty lines. According to the project's code style guidelines, redundant empty lines between code blocks should be removed.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines 4 to 8

<OutputType>Exe</OutputType>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the empty line at line 4. According to the project's code style guidelines, redundant empty lines should be removed.

Copilot uses AI. Check for mistakes.
Comment on lines 17 to 21
<PackageReference Include="xunit.v3" />
<PackageReference Include="Verify.XunitV3" />
<PackageReference Include="Verify.DiffPlex" />
<PackageReference Include="System.ComponentModel.Annotations" Condition="'$(TargetFramework)' == 'net48' " />
<ProjectReference Include="..\Humanizer\Humanizer.csproj" />
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace after the closing tag. The project follows strict formatting guidelines.

Copilot uses AI. Check for mistakes.
Comment thread src/Directory.Packages.props Outdated
<PackageVersion Include="Xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="Verify.XunitV3" Version="31.0.1" />
<PackageVersion Include="xunit.v3" Version="3.1.0" />
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace after the closing tag. The project follows strict formatting guidelines.

Suggested change
<PackageVersion Include="xunit.v3" Version="3.1.0" />
<PackageVersion Include="xunit.v3" Version="3.1.0" />

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment thread src/Humanizer.Tests/UseCultureAttribute.cs Outdated
Copilot AI review requested due to automatic review settings October 12, 2025 00:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread src/Humanizer.Tests/UseCultureAttribute.cs Outdated
Comment thread src/Humanizer.Tests/UseCultureAttribute.cs
Copilot AI review requested due to automatic review settings October 12, 2025 00:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread src/Humanizer.Tests/UseCultureAttribute.cs
Comment thread src/Humanizer.Tests/UseCultureAttribute.cs
Comment thread src/Humanizer.Tests/UseCultureAttribute.cs
Copilot AI review requested due to automatic review settings October 12, 2025 01:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread azure-pipelines.yml Outdated
Copilot AI review requested due to automatic review settings October 12, 2025 01:45
@clairernovotny clairernovotny force-pushed the xunit3 branch 2 times, most recently from d3fc281 to 6f43c40 Compare October 12, 2025 01:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings October 12, 2025 15:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment on lines 4 to +5

/// <summary>
/// Apply this attribute to your test method to replace the
/// <see cref="Thread.CurrentThread" /> <see cref="CultureInfo.CurrentCulture" /> and
/// <see cref="CultureInfo.CurrentUICulture" /> with another culture.
/// </summary>


Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple consecutive empty lines should be reduced to a single empty line to follow the project's style guidelines.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings October 12, 2025 15:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings October 12, 2025 16:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comment on lines 19 to 22
/// Replaces the culture and UI culture of the current thread with
/// <paramref name="culture" />
/// </summary>
/// <param name="culture">The name of the culture.</param>
/// </remarks>
/// <remarks>
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XML documentation has redundant content. The <summary> and first <remarks> section describe the same functionality. Consider consolidating or removing the redundant <remarks> section.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings October 12, 2025 16:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@clairernovotny clairernovotny enabled auto-merge (squash) October 12, 2025 16:22
@clairernovotny clairernovotny merged commit fe648c8 into main Oct 12, 2025
7 checks passed
@clairernovotny clairernovotny deleted the xunit3 branch October 12, 2025 16:29
<PropertyGroup>
<TargetFrameworks>net10.0;net8.0;net48</TargetFrameworks>
<OutputType>Exe</OutputType>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is no longer required now that you use the MTP-based dotnet test.

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.

3 participants