Skip to content

Add xUnit v3 packages to Architecture.Tests (#176) - #182

Merged
mpaulosky merged 1 commit into
sprint/8-xunit-v3-pilotfrom
squad/176-xunit-v3-architecture-tests
Apr 26, 2026
Merged

Add xUnit v3 packages to Architecture.Tests (#176)#182
mpaulosky merged 1 commit into
sprint/8-xunit-v3-pilotfrom
squad/176-xunit-v3-architecture-tests

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Closes #176

Working as Boromir (DevOps Engineer)

Mirrors the Sprint 7 Domain.Tests xUnit v3 pilot by upgrading Architecture.Tests from xunit 2.x to xunit.v3 3.2.2.

Changes

  • tests/Architecture.Tests/Architecture.Tests.csproj
    • Replaced <PackageReference Include="xunit"/> with <PackageReference Include="xunit.v3"/> (version 3.2.2 centralized in Directory.Packages.props)
    • Added <PackageReference Include="xunit.analyzers"/> (version 1.27.0 centralized)
    • Added xunit.runner.json as Content item (matching Domain.Tests pattern)
  • tests/Architecture.Tests/xunit.runner.json — new file matching Domain.Tests Sprint 7 configuration

Sprint 7 Pilot Context

Directory.Packages.props already contained xunit.v3 3.2.2, xunit.v3.assert, xunit.v3.extensibility.core, and xunit.analyzers 1.27.0 from the Sprint 7 Domain.Tests pilot. This PR wires up Architecture.Tests to use those centralized entries.

NuGet Policy Compliance

✅ All versions remain in Directory.Packages.props — no version pins in .csproj

Local Validation

  • dotnet build: ✅ 0 errors
  • dotnet test tests/Architecture.Tests: ✅ 11/11 passed
  • dotnet test tests/Domain.Tests: ✅ 42/42 passed (pilot unaffected)

…Tests pilot) — closes #176

- Replace xunit 2.x PackageReference with xunit.v3 (3.2.2, centralized in Directory.Packages.props)
- Add xunit.analyzers PackageReference (version 1.27.0 centralized)
- Add xunit.runner.json matching Domain.Tests Sprint 7 pilot config
- No version pins in .csproj — all versions remain in Directory.Packages.props

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 26, 2026 13:13
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label Apr 26, 2026
@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.

@mpaulosky
mpaulosky merged commit 1dd2081 into sprint/8-xunit-v3-pilot Apr 26, 2026
14 checks passed
@mpaulosky
mpaulosky deleted the squad/176-xunit-v3-architecture-tests branch April 26, 2026 13:15

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

Upgrades the Architecture.Tests project to the repo’s xUnit v3 pilot setup (already used in Domain.Tests), aligning it with centralized package versions and adding runner configuration.

Changes:

  • Switch Architecture.Tests from xunit (v2) to xunit.v3 and add xunit.analyzers.
  • Add xunit.runner.json and ensure it’s copied to the test output directory for runner configuration.

Reviewed changes

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

File Description
tests/Architecture.Tests/Architecture.Tests.csproj Updates test dependencies to xUnit v3 + analyzers and wires in runner config file as content.
tests/Architecture.Tests/xunit.runner.json Adds xUnit runner configuration matching the existing Domain.Tests setup (method display + parallelization settings).

@codecov

codecov Bot commented Apr 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.53%. Comparing base (29415ad) to head (8e6d07b).
⚠️ Report is 2 commits behind head on sprint/8-xunit-v3-pilot.

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

mpaulosky added a commit that referenced this pull request Apr 26, 2026
## Summary

Migrates Architecture.Tests test methods to xUnit v3 API conventions,
following the Sprint 7 Domain.Tests pilot pattern.

Closes #178

**Working as Gimli (Tester)**

---

## What Changed

All 4 test files updated with proper xUnit v3 migration conventions:

| File | Tests | Change |
|------|-------|--------|
| `DomainLayerTests.cs` | 4 | AAA comments + extract `assembly` variable
for clean Arrange/Act split |
| `VsaLayerTests.cs` | 3 | AAA comments + extract `domainAssembly`
variable |
| `ThemeLayerTests.cs` | 2 | AAA comments |
| `CachingLayerTests.cs` | 2 | AAA comments |

**Total: 11 tests migrated**

## xUnit v3 API Observations

- `[Fact]` attribute is **identical** in xUnit v2 and v3 — no attribute
changes required
- No async/await patterns in architecture tests — no lifecycle changes
needed
- No `IClassFixture` / `ICollectionFixture` — stateless tests, no
collection changes needed
- FluentAssertions `.Should()` works unchanged with xUnit v3
- Parallelization via `xunit.runner.json` was already configured in Wave
1 (#182)

## Pattern Reference (Sprint 7 Domain.Tests Pilot)

Followed the same approach as the Sprint 7 Domain.Tests migration:
- xUnit v3 meta-package via `<PackageReference Include="xunit.v3"/>` ✅
(Wave 1)
- `xunit.runner.json` with `parallelizeAssembly: true` ✅ (Wave 1)
- Gimli Rule #3: AAA comments on all test methods ✅ (this PR)
- Gimli Rule #6: File headers present on all files ✅ (pre-existing)

## Test Results

```
Passed! - Failed: 0, Passed: 11, Skipped: 0, Total: 11 — Architecture.Tests.dll
Passed! - Failed: 0, Passed: 42, Skipped: 0, Total: 42 — Domain.Tests.dll
```

Zero failures. Ready to merge to `sprint/8-xunit-v3-pilot`.

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