Skip to content

feat: add xUnit v3 packages to Directory.Packages.props (#162)#173

Merged
mpaulosky merged 2 commits into
sprint/7-xunit-v3-pilotfrom
squad/162-xunit-v3-nuget-version
Apr 25, 2026
Merged

feat: add xUnit v3 packages to Directory.Packages.props (#162)#173
mpaulosky merged 2 commits into
sprint/7-xunit-v3-pilotfrom
squad/162-xunit-v3-nuget-version

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Adds xUnit v3 (3.2.2 stable) package family to Directory.Packages.props as part of Sprint 7 xUnit v3 pilot.

Changes

Directory.Packages.props — added 4 package versions to the centralized NuGet manifest:

Package Version Purpose
xunit.v3 3.2.2 Main xUnit v3 metapackage
xunit.v3.assert 3.2.2 v3 assertion library
xunit.v3.extensibility.core 3.2.2 v3 extensibility hooks
xunit.analyzers 1.27.0 Roslyn analyzers (v2 + v3 compatible)

xunit (2.9.3) and xunit.runner.visualstudio (3.1.5) were already present and are retained.

Notes

  • All versions are centralized in Directory.Packages.props per team convention — no version attributes added to any .csproj
  • dotnet restore verified locally — no resolution errors
  • xUnit v2 (xunit 2.9.3) is retained for backward compatibility while other test projects migrate

Closes #162


Working as Boromir (DevOps engineer) — NuGet centralized version management

Boromir and others added 2 commits April 24, 2026 18:46
Add xUnit v3.2.2 (stable) metapackage family and analyzers to centralized
NuGet version management. xUnit v2 (2.9.3) retained for backward compat
until all test projects are migrated.

New packages:
- xunit.v3 3.2.2 — main v3 metapackage
- xunit.v3.assert 3.2.2 — v3 assertion library
- xunit.v3.extensibility.core 3.2.2 — v3 extensibility hooks
- xunit.analyzers 1.27.0 — Roslyn analyzers (v2 + v3 compatible)

xunit.runner.visualstudio 3.1.5 already present and supports v3.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…166)

- Document pilot scope: Domain.Tests in Sprint 7
- Include v3 rationale: MTP adoption, performance gains, ecosystem alignment
- Provide rollout plan: Sprints 7–13, per-project versioning strategy
- Add performance analysis: baseline metrics (104ms Domain.Tests), projected 5–15% improvement
- Include migration examples: before/after test code, API changes
- Outline risk mitigation: incremental rollout, measurement plan, fallback strategy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 25, 2026 02:11
@github-actions

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds centralized NuGet package versions for the xUnit v3 package family to enable a gradual v2→v3 migration, and documents the Sprint 7 pilot decision via a new ADR.

Changes:

  • Added centralized PackageVersion entries for xunit.v3 and related packages (plus xunit.analyzers) in Directory.Packages.props.
  • Added an ADR describing the Sprint 7–13 xUnit v3 migration plan/pilot and rationale.

Reviewed changes

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

File Description
Directory.Packages.props Adds xUnit v3 and analyzer package versions to the centralized NuGet version manifest.
docs/adr/sprint7-xunit-v3-migration.md Introduces an ADR capturing the xUnit v3 pilot decision, rollout plan, and references.

```xml
<ItemGroup>
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.v3" Version="3.0.x" />

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

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

The example Directory.Packages.props snippet pins xunit.v3 to 3.0.x, but this PR centralizes xunit.v3 at 3.2.2. To avoid confusing readers during the rollout, update the snippet to match the actual version (or use a generic 3.x placeholder if you intentionally don't want to pin a specific minor/patch in the ADR).

Suggested change
<PackageVersion Include="xunit.v3" Version="3.0.x" />
<PackageVersion Include="xunit.v3" Version="3.2.2" />

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +4
---
post_title: "ADR: Migrate to xUnit v3 (Pilot)"
author1: "Pippin"
post_slug: "adr-sprint7-xunit-v3-migration"

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

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

PR description/summary currently only mentions adding xUnit v3 packages to Directory.Packages.props, but this PR also introduces a new ADR document. Please update the PR description to include the ADR addition (or split the ADR into a separate PR) so the change scope is accurately reflected.

Copilot uses AI. Check for mistakes.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

209 tests  ±0   209 ✅ ±0   14s ⏱️ ±0s
  5 suites ±0     0 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 1f95913. ± Comparison against base commit e7035b1.

@codecov

codecov Bot commented Apr 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.12%. Comparing base (e7035b1) to head (1f95913).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           sprint/7-xunit-v3-pilot     #173   +/-   ##
========================================================
  Coverage                    72.12%   72.12%           
========================================================
  Files                           43       43           
  Lines                          721      721           
  Branches                       112      112           
========================================================
  Hits                           520      520           
  Misses                         150      150           
  Partials                        51       51           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpaulosky
mpaulosky merged commit f69d031 into sprint/7-xunit-v3-pilot Apr 25, 2026
19 of 20 checks passed
@mpaulosky
mpaulosky deleted the squad/162-xunit-v3-nuget-version branch April 25, 2026 02:34
mpaulosky added a commit that referenced this pull request Apr 25, 2026
…#165) (#174)

## Summary

Adds a `test-domain` job to `squad-test.yml` to validate that
Domain.Tests runs correctly in CI under xUnit v3. This unblocks Gimli's
migration work (#163/#164) — the CI pipeline is ready before test code
is written.

## Changes

**`.github/workflows/squad-test.yml`** — 3 targeted edits:

1. **New `test-domain` job** — runs `tests/Domain.Tests` with the same
pattern as other test jobs:
   - `dotnet build` + `dotnet test --no-build` (Release config)
   - `--collect:"XPlat Code Coverage"` with Cobertura format
   - TRX logger → `domain-test-results` artifact
   - Guard clause: skips gracefully if project not found

2. **`coverage` job** — added `test-domain` to `needs` list so
Domain.Tests coverage is included in the report

3. **`report` job** — added `test-domain` to `needs` list and job
summary output; added `domain_status` to the overall failure gate

## xUnit v3 CI Compatibility

No runner/tool changes were required:

| Tool | v2 compat | v3 compat | Notes |
|------|-----------|-----------|-------|
| `dotnet test` | ✅ | ✅ | No changes needed |
| `XPlat Code Coverage` | ✅ | ✅ | Coverlet collector works unchanged |
| TRX logger | ✅ | ✅ | Standard .NET test output |
| `EnricoMi/publish-unit-test-result-action` | ✅ | ✅ | Reads TRX, not
xUnit-specific |
| `coverlet.collector` 10.0.0 | ✅ | ✅ | Already in
Directory.Packages.props |

## Depends on

PR #173 (feat: add xUnit v3 packages to Directory.Packages.props) should
merge first so the NuGet packages are available.

Closes #165

---
*Working as Boromir (DevOps engineer) — CI/CD pipeline management*

Co-authored-by: Boromir <boromir@squad.dev>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants