test(domain): verify xUnit v3 source-level fixes — no changes needed (#164) - #171
test(domain): verify xUnit v3 source-level fixes — no changes needed (#164)#171mpaulosky wants to merge 3 commits into
Conversation
- Add xunit.v3 3.2.2 to Directory.Packages.props - Replace xunit → xunit.v3 package reference in Domain.Tests.csproj - Add xunit.runner.json with v3-compatible runner configuration - All 42 tests pass; no source file changes required (simple Facts/Theories) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Document migration pattern, key facts, and pilot results - Clarify [Fact]/[Theory] preserved unchanged in v3 - Note IAsyncLifetime ValueTask change for future sprints - Correct Pippin's ADR [Fact]→[Test] misstatement via decisions inbox Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
There was a problem hiding this comment.
Pull request overview
Verifies the Sprint 7 xUnit v3 migration for tests/Domain.Tests and documents the results/learnings for future rollouts.
Changes:
- Add
xunit.v3to central package versions and switchDomain.Teststo reference it. - Add
xunit.runner.jsonconfiguration and copy it to test output. - Document Sprint 7 migration verification and key xUnit v3 learnings in Gimli’s history.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
tests/Domain.Tests/xunit.runner.json |
Introduces xUnit runner configuration (display + parallelization + diagnostics). |
tests/Domain.Tests/Domain.Tests.csproj |
Swaps xunit → xunit.v3 and ensures runner config is emitted to output. |
Directory.Packages.props |
Adds centralized version for xunit.v3. |
.squad/agents/gimli/history.md |
Records verification steps/results and migration learnings for Sprint 7. |
| <PackageReference Include="xunit.v3"/> | ||
| <PackageReference Include="xunit.runner.visualstudio"/> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/> | ||
| </ItemGroup> |
There was a problem hiding this comment.
Domain.Tests.csproj doesn't explicitly set <OutputType>Exe</OutputType>, even though the PR/issue context claims standalone dotnet run (MTP) is verified and earlier migration notes mention OutputType=Exe. If xunit.v3 isn't implicitly flipping the output type, dotnet run will fail for a library project; consider setting <OutputType>Exe</OutputType> explicitly (or update the PR description if it's intentionally omitted and still works).
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/> |
There was a problem hiding this comment.
xunit.runner.json is already included as a default None item in SDK-style projects; adding it via <Content Include=...> can create duplicate items and differs from the established pattern in tests/Web.Tests.Integration/Web.Tests.Integration.csproj (uses <None Update="xunit.runner.json"> with CopyToOutputDirectory). Recommend switching this to <None Update="xunit.runner.json"> to match repo convention and avoid item duplication.
| <Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/> | |
| <None Update="xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/> |
| ## 2026-04-24 — Sprint 7: xUnit v3 Pilot — Domain.Tests Migration (#163 / #164) | ||
|
|
||
| ### Task | ||
| Migrate `tests/Domain.Tests` from xUnit v2 (2.9.3) to xUnit v3 (3.2.2) as the Sprint 7 pilot, then verify no remaining compilation/runtime issues (issue #164). | ||
|
|
||
| ### Work Done | ||
|
|
||
| **Branch**: `squad/163-domain-tests-xunit-v3-migration` / `squad/164-domain-tests-xunit-v3-fixes` | ||
|
|
||
| 1. **`Directory.Packages.props`** — Added `xunit.v3 3.2.2`; kept `xunit 2.9.3` for other projects still on v2. | ||
| 2. **`Domain.Tests.csproj`** — Replaced `xunit` → `xunit.v3` package reference; added `xunit.runner.json` as `<Content CopyToOutputDirectory="PreserveNewest"/>`. | ||
| 3. **`tests/Domain.Tests/xunit.runner.json`** — New file: `parallelizeAssembly: true`, `parallelizeTestCollections: true`, `methodDisplay: method`. |
There was a problem hiding this comment.
PR description says "no source fixes required" and that the only change in this PR is .squad/agents/gimli/history.md, but this diff also modifies package management and the Domain.Tests project (adds xunit.v3, adds xunit.runner.json, etc.). Please reconcile the PR description (and/or split into separate PRs) so reviewers and release notes correctly reflect the actual changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## sprint/7-xunit-v3-pilot #171 +/- ##
==========================================================
Coverage ? 72.53%
==========================================================
Files ? 43
Lines ? 721
Branches ? 112
==========================================================
Hits ? 523
Misses ? 149
Partials ? 49 🚀 New features to boost your workflow:
|
…emote branch prune (#237) ## Summary Working as Ralph (Meta) Closes #236 ## Changes - **Merged PR #235** — squash merged with all 23 CI checks passing - **Pruned 6 stale remote branches** (Sprint 6–8 orphans, all associated issues/PRs closed since April 2026): - `origin/squad/140-domain-servicedefaults-ca-warnings` (PR #156) - `origin/squad/153-web-infrastructure-warnings` (PR #157) - `origin/squad/154-webtests-bunit-warnings` (PR #158) - `origin/squad/155-test-assembly-ca1014` (PR #159) - `origin/squad/164-domain-tests-xunit-v3-fixes` (PR #171) - `origin/sprint/8-xunit-v3-pilot` (PR #188) - **Updated `identity/now.md`**: Sprint 16 ready, remote hygiene milestone noted - **Updated `ralph/history.md`**: 2026-05-06 follow-up session log appended ## Verification - Pre-commit gate: ✅ 0 markdownlint errors - Pre-push gate (build + tests + integration): ✅ all green Co-authored-by: Boromir <boromir@squad.dev> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Verifies all #164 acceptance criteria after the Domain.Tests xUnit v3 migration (see #163 / PR #170). No source fixes required — the migration was clean.
Working as Gimli (Tester) 🪓
Closes #164
Depends on PR #170 (merge first)
Acceptance Criteria Verification
dotnet build tests/Domain.Tests -c Releaseclean (warnings-as-errors)TreatWarningsAsErrors=true;CodeAnalysisTreatWarningsAsErrors=falseexempts CA analyzer warnings by designdotnet test tests/Domain.Tests -c Release --no-buildall passdotnet run --project tests/Domain.Tests -c Release(standalone MTP)async voidtests; no removed types in usecoverage.cobertura.xmlgeneratedChanges
.squad/agents/gimli/history.mdKey Learnings Documented
xunit.v3is the package name (notxunitat v3.x)[Fact]/[Theory]are preserved unchanged in v3 (no renames)IAsyncLifetimenow returnsValueTask— relevant for Integration.Tests in Sprint 10–11dotnet runstandalone executable works via MTP--collect:"XPlat Code Coverage"unaffected