Commit b0b8ae2e authored by Michael Conrad's avatar Michael Conrad Committed by Michael Conrad

Add .Net Test Junit example

parent a36d844f
......@@ -171,6 +171,32 @@ cpp:
junit: report.xml
```
#### .Net Test
The [JunitXML.TestLogger](https://www.nuget.org/packages/JunitXml.TestLogger/) nuget
package can generate test reports for .Net Framework and .Net Core applications. The following
example expects a solution in the root folder of the repository, with one or more
project files in sub-folders. One result file is produced per test project, and each
are placed in a new artifacts folder. This example includes optional formatting arguments, which
improve the readability of test data in the test widget. A full .Net Core example is availble
[here](https://gitlab.com/Siphonophora/dot-net-cicd-test-logging-demo).
```yaml
## Source code and documentation are here: https://github.com/spekt/junit.testlogger/
Test:
stage: test
script:
- 'dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=..\artifacts\{assembly}-test-result.xml;MethodFormat=Class;FailureBodyFormat=Verbose"'
artifacts:
when: always
paths:
- .\**\*test-result.xml
reports:
junit:
- .\**\*test-result.xml
```
## Limitations
Currently, the following tools might not work because their XML formats are unsupported in GitLab.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment