Skip to content

Update XUnit to v3#1857

Merged
tomjebo merged 6 commits intomainfrom
xunit-v3
Mar 17, 2025
Merged

Update XUnit to v3#1857
tomjebo merged 6 commits intomainfrom
xunit-v3

Conversation

@twsouthwick
Copy link
Member

No description provided.

@github-actions
Copy link

github-actions bot commented Jan 6, 2025

Test Results

    66 files   -     4      66 suites   - 4   1h 10m 1s ⏱️ + 6m 0s
 2 041 tests ±    0   2 038 ✅ ±    0   3 💤 ±0  0 ❌ ±0 
37 523 runs  +5 105  37 481 ✅ +5 099  42 💤 +6  0 ❌ ±0 

Results for commit b227f3e. ± Comparison against base commit 09a06c8.

This pull request removes 599 and adds 599 tests. Note that renamed tests count towards both.
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "", prefix: "", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://purl.org/dc/elements/1.1/", prefix: "dc", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://purl.org/dc/terms/", prefix: "dcterms", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://schemas.microsoft.com/ink/2010/main", prefix: "msink", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://schemas.microsoft.com/office/2006/01/custom"···, prefix: "mso", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://schemas.microsoft.com/office/2006/activeX", prefix: "ax", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://schemas.microsoft.com/office/2006/coverPage"···, prefix: "cppr", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://schemas.microsoft.com/office/2006/customDoc"···, prefix: "cdip", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://schemas.microsoft.com/office/2006/metadata/"···, prefix: "ct", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: "http://schemas.microsoft.com/office/2006/metadata/"···, prefix: "lp", version: Office2007)
…
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"\", prefix: \"\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://purl.org/dc/elements/1.1/\", prefix: \"dc\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://purl.org/dc/terms/\", prefix: \"dcterms\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://schemas.microsoft.com/ink/2010/main\", prefix: \"msink\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://schemas.microsoft.com/office/2006/01/custom\"···, prefix: \"mso\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://schemas.microsoft.com/office/2006/activeX\", prefix: \"ax\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://schemas.microsoft.com/office/2006/coverPage\"···, prefix: \"cppr\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://schemas.microsoft.com/office/2006/customDoc\"···, prefix: \"cdip\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://schemas.microsoft.com/office/2006/metadata/\"···, prefix: \"ct\", version: Office2007)
DocumentFormat.OpenXml.Framework.Tests.OpenXmlNamespaceTests ‑ NamespacePrefixTest(ns: \"http://schemas.microsoft.com/office/2006/metadata/\"···, prefix: \"lp\", version: Office2007)
…

♻️ This comment has been updated with latest results.

Copy link

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.

PR Overview

This pull request updates the testing infrastructure to support XUnit v3. Key changes include:

  • Temporarily disabling the code coverage workflow step in .github/workflows/code-coverage.yml.
  • Updating the dotnet test command in .github/workflows/build.yml to use new XUnit v3 flags and modifying the artifact upload path.
  • Removing references to Xunit.Abstractions across several test files and deleting an obsolete source generator verifier test file.

Reviewed Changes

File Description
.github/workflows/code-coverage.yml Added a temporary disable condition for the job while integrating XUnit v3
.github/workflows/build.yml Updated test command and artifact path to align with XUnit v3 reporting
test/Common/VerifiableLog.cs, ObjectSizeTests.cs, ParticleTests.cs, ElementLookupTests.cs, PartConstraintRuleTests.cs Removed reference to Xunit.Abstractions
test/Common/ITestOutputHelperExtenstions.cs Changed using from Xunit.Abstractions to Xunit (note potential file name typo)
test/DocumentFormat.OpenXml.Generator.Tests/Verifiers/OpenXmlIncrementalSourceGeneratorVerifier.cs Removed obsolete source generator verifier tests

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

Comments suppressed due to low confidence (3)

.github/workflows/code-coverage.yml:23

  • Disabling the code coverage step may lead to missing coverage metrics. Consider adding a TODO or reference issue to re-enable this step once XUnit v3 integration is complete.
if: false # Disable for now while getting XUnit v3 working

.github/workflows/build.yml:99

  • Verify that the updated test command using '--report-xunit-trx' is fully compatible with XUnit v3 and that any removal of previous logger options does not affect test reporting.
run: dotnet test --no-restore -- --results-directory ${{ github.workspace }}/test-results/ --report-xunit-trx

test/DocumentFormat.OpenXml.Generator.Tests/Verifiers/OpenXmlIncrementalSourceGeneratorVerifier.cs:1

  • The removal of this source generator verifier file could reduce test coverage for the source generator functionality. Ensure that equivalent tests exist or that additional coverage is provided.
Entire file removal

using Newtonsoft.Json.Converters;
using System.IO;
using Xunit.Abstractions;
using Xunit;
Copy link

Copilot AI Mar 10, 2025

Choose a reason for hiding this comment

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

The file name 'ITestOutputHelperExtenstions.cs' appears to contain a typographical error; consider renaming it to 'ITestOutputHelperExtensions.cs' for clarity.

Copilot uses AI. Check for mistakes.
@tomjebo tomjebo merged commit dc15de0 into main Mar 17, 2025
22 checks passed
@tomjebo tomjebo deleted the xunit-v3 branch March 17, 2025 17:31
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.

4 participants