Hello everyone,
apologies in advance if I post in the wrong section or someone already asked about this. My search did not produce anything as of yet.
The problem:
I am running dotnet tests and creating test result xml file via the JunitXML.TestLogger package.
The tests are executed successfully and the report files are generated correctly and completely.
However, in the Tests tab of the pipeline, only a portion of the files are loaded. I.E.: 63 tests were executed, and are present in the xml file but only 46 of them are displayed.
I have tried to separate the tests in their own jobs, ensured the test result files had unique names, ensured the files are uploaded as artifacts but it still fails to load all the tests results.
Excerpt of the pipeline for one of the test jobs:
Test-Admin:
stage: test
interruptible: true
tags:
- linux-gke-prod
image: mcr.microsoft.com/dotnet/sdk:8.0
before_script:
- cd src/rest-api
- dotnet tool install --global JetBrains.dotCover.CommandLineTools --version 2024.1.0
- PATH="${PATH}:/root/.dotnet/tools"
script:
- dotnet test ./Admin/Tests/Tests.csproj -l "console;verbosity=quiet" --logger:"junit;LogFilePath=..\artifacts\{assembly}-TestResults.xml;MethodFormat=Class;"
artifacts:
when: always
paths:
- './src/rest-api/Admin/artifacts/Dealerbase.Services.Admin.Tests-TestResults.xml'
reports:
junit:
- './src/rest-api/Admin/artifacts/Dealerbase.Services.Admin.Tests-TestResults.xml'
untracked: false
expire_in: 30 days
allow_failure: false
Excertp of the test result file:
Result in the Test tab of the pipeline:
Anyone knows how to show all tests?