dotnet_test
`dotnet test`: xunit/nunit `[FAIL]` markers and the `Failed!` summary line.
dotnettesttoolmatcher
Install: ci-doctor matchers add official/dotnet_test
matchers/dotnet/dotnet_test/matcher.yaml
id: dotnet_testrole: toolclassification: [dotnet, test]description: '`dotnet test`: xunit/nunit `[FAIL]` markers and the `Failed!` summary line.'pattern: '\[FAIL\]|^\s*Failed\s+\S+\s+\[\d|^Failed!\s+-\s+Failed:'before: 1after: 12
In bundles
Fixtures
Framing stripped per provider. Highlighted lines are what this matcher selects; the marked line is the anchor.
dotnet_test_failureOpen in playground
1Current runner version: '2.336.0'
2##[group]Operating System
3Ubuntu
424.04.4
5LTS
6##[endgroup]
7Secret source: Actions
8Prepare workflow directory
9Prepare all required actions
10Complete job name: dotnet_test_failure
11##[group]Set up job
12Image: ubuntu-24.04
13Runner name: 'GitHub Actions 12'
14##[endgroup]
15Download action repository 'actions/checkout@v4'
16Download action repository 'actions/cache@v4'
17##[group]Run actions/checkout@v4
18 with:
19 fetch-depth: 20
20 lfs: false
21##[endgroup]
22Syncing repository: acme/ledger
23##[group]Getting Git version info
24Working directory is '/home/runner/work/ledger/ledger'
25##[endgroup]
26/usr/bin/git checkout --progress --force 8ad41f02
27##[group]Run actions/cache@v4
28 with:
29 path: ~/.cache
30 key: Linux-deps-8ad41f02
31##[endgroup]
32Received 41943040 of 41943040 (100.0%), 40.0 MBs/sec
33Cache restored from key: Linux-deps-8ad41f02
34##[group]Run dotnet --version
35dotnet --version
36dotnet restore
37dotnet test --no-restore --logger "console;verbosity=normal"
38shell: /usr/bin/bash -e {0}
39##[endgroup]
408.0.303
41 Determining projects to restore...
42 Restored /builds/team/billing/src/Billing/Billing.csproj (in 4.1 sec).
43 Restored /builds/team/billing/tests/Billing.Tests/Billing.Tests.csproj (in 4.3 sec).
44 Billing -> /builds/team/billing/src/Billing/bin/Debug/net8.0/Billing.dll
45 Billing.Tests -> /builds/team/billing/tests/Billing.Tests/bin/Debug/net8.0/Billing.Tests.dll
46Test run for /builds/team/billing/tests/Billing.Tests/bin/Debug/net8.0/Billing.Tests.dll (.NETCoreApp,Version=v8.0)
47VSTest version 17.10.0 (x64)
48
49Starting test execution, please wait...
50A total of 1 test files matched the specified pattern.
51[xUnit.net 00:00:01.42] Billing.Tests.InvoiceTests.AppliesVatToNetTotal [FAIL]
52 Failed Billing.Tests.InvoiceTests.AppliesVatToNetTotal [12 ms]
53 Error Message:
54 Assert.Equal() Failure: Values differ
55Expected: 12000
56Actual: 11999
57 Stack Trace:
58 at Billing.Tests.InvoiceTests.AppliesVatToNetTotal() in /builds/team/billing/tests/Billing.Tests/InvoiceTests.cs:line 64
59
60Failed! - Failed: 1, Passed: 87, Skipped: 0, Total: 88, Duration: 940 ms
61##[error]Process completed with exit code 1.
62##[group]Post Run actions/checkout@v4
63##[endgroup]
64/usr/bin/git version
65git version 2.54.0
66##[group]Post Run actions/upload-artifact@v4
67##[endgroup]
68Artifact upload complete.
69Post job cleanup.
70Cleaning up orphan processes
1Running with gitlab-runner 16.10.0 (be4e0e33)
2 on windows-docker-01 Dn4Pq7Vt, system ID: s_cc99aa11bb22
3Preparing the "docker" executor
4 Using Docker executor with image mcr.microsoft.com/dotnet/sdk:8.0 ...
5Using Docker executor with image mcr.microsoft.com/dotnet/sdk:8.0 ...
6Using docker image sha256:5f4e3d2c1b0a for mcr.microsoft.com/dotnet/sdk:8.0 with digest sdk@sha256:77ab...
7Preparing environment
8Running on runner-dn4pq7vt-project-71-concurrent-0...
9Fetching changes...
10Checking out 9c2e5a17 as detached HEAD...
11Checking cache for nuget-packages-8.0...
12Successfully extracted cache
13$ dotnet --version
148.0.303
15$ dotnet restore
16 Determining projects to restore...
17 Restored /builds/team/billing/src/Billing/Billing.csproj (in 4.1 sec).
18 Restored /builds/team/billing/tests/Billing.Tests/Billing.Tests.csproj (in 4.3 sec).
19$ dotnet test --no-restore --logger "console;verbosity=normal"
20 Billing -> /builds/team/billing/src/Billing/bin/Debug/net8.0/Billing.dll
21 Billing.Tests -> /builds/team/billing/tests/Billing.Tests/bin/Debug/net8.0/Billing.Tests.dll
22Test run for /builds/team/billing/tests/Billing.Tests/bin/Debug/net8.0/Billing.Tests.dll (.NETCoreApp,Version=v8.0)
23VSTest version 17.10.0 (x64)
24
25Starting test execution, please wait...
26A total of 1 test files matched the specified pattern.
27[xUnit.net 00:00:01.42] Billing.Tests.InvoiceTests.AppliesVatToNetTotal [FAIL]
28 Failed Billing.Tests.InvoiceTests.AppliesVatToNetTotal [12 ms]
29 Error Message:
30 Assert.Equal() Failure: Values differ
31Expected: 12000
32Actual: 11999
33 Stack Trace:
34 at Billing.Tests.InvoiceTests.AppliesVatToNetTotal() in /builds/team/billing/tests/Billing.Tests/InvoiceTests.cs:line 64
35
36Failed! - Failed: 1, Passed: 87, Skipped: 0, Total: 88, Duration: 940 ms
37Running after_script
38$ echo "tests failed, skipping publish"
39tests failed, skipping publish
40Uploading artifacts for failed job
41Uploading artifacts as "archive" to coordinator... 201 Created
42ERROR: Job failed: exit code 1