Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@ jobs:

- name: Unit tests
run: >-
dotnet test tests/AdCodicem.ValueObjects.UnitTests
dotnet test --project tests/AdCodicem.ValueObjects.UnitTests
--no-build -c Release
--logger "trx;LogFileName=unit.trx"
--collect:"XPlat Code Coverage"
--report-trx --report-trx-filename unit.trx
--coverage --coverage-output-format cobertura

- name: Generator tests
run: >-
dotnet test tests/AdCodicem.ValueObjects.GeneratorTests
dotnet test --project tests/AdCodicem.ValueObjects.GeneratorTests
--no-build -c Release
--logger "trx;LogFileName=generator.trx"
--report-trx --report-trx-filename generator.trx

# The runner ships a Docker daemon, which is what Testcontainers needs to start
# PostgreSQL and SQL Server for the persistence and API tests.
- name: Integration tests
run: >-
dotnet test tests/AdCodicem.ValueObjects.IntegrationTests
dotnet test --project tests/AdCodicem.ValueObjects.IntegrationTests
--no-build -c Release
--logger "trx;LogFileName=integration.trx"
--report-trx --report-trx-filename integration.trx

# Solution-wide --no-build trips NETSDK1085: the non-packable test/benchmark/sample
# projects still resolve their ProjectReferences during Pack, which re-invokes Build
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ dotnet test tests/AdCodicem.ValueObjects.GeneratorTests # the generator itself
dotnet test tests/AdCodicem.ValueObjects.IntegrationTests # needs Docker
dotnet pack -c Release -o artifacts/packages

# One test
dotnet test tests/AdCodicem.ValueObjects.UnitTests --filter "FullyQualifiedName~The_name_of_the_test"
# One test (xunit.v3 runs on Microsoft Testing Platform; wildcards, not substrings, so wrap the name in *)
dotnet test tests/AdCodicem.ValueObjects.UnitTests --filter-method "*The_name_of_the_test*"

# Benchmarks; wants a quiet machine, and absolute timings are not comparable across runs
cd benchmarks/AdCodicem.ValueObjects.Benchmarks
Expand Down
11 changes: 6 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@

<ItemGroup Label="Testing">
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="xunit.v3" Version="3.1.0" />
<PackageVersion Include="xunit.v3.extensibility.core" Version="3.1.0" />
<PackageVersion Include="xunit.v3.assert" Version="3.1.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.0" />
<PackageVersion Include="xunit.v3" Version="4.0.0" />
<PackageVersion Include="xunit.v3.extensibility.core" Version="4.0.0" />
<PackageVersion Include="xunit.v3.assert" Version="4.0.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.0" />
<PackageVersion Include="AwesomeAssertions" Version="9.4.0" />
<PackageVersion Include="NSubstitute" Version="6.2.0" />
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="2.4.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.11.0" />
<PackageVersion Include="Testcontainers.PostgreSql" Version="4.15.0" />
<PackageVersion Include="Testcontainers.MsSql" Version="4.15.0" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
Expand Down
3 changes: 3 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
3 changes: 2 additions & 1 deletion tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<PackageReference Include="AwesomeAssertions" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" PrivateAssets="all" />
<PackageReference Include="coverlet.collector" PrivateAssets="all" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading