Add annotations support to dotnet-trx

This commit is contained in:
Michal Dorner 2021-01-14 21:39:51 +01:00
parent 6f32e41222
commit c4b64b0cf4
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
2 changed files with 77 additions and 6 deletions

View file

@ -2,7 +2,36 @@
exports[`dotnet-trx tests matches report snapshot 1`] = `
Object {
"annotations": Array [],
"annotations": Array [
Object {
"annotation_level": "failure",
"end_line": 9,
"message": "System.DivideByZeroException : Attempted to divide by zero.",
"path": "DotnetTests.Unit/Calculator.cs",
"start_line": 9,
"title": "[DotnetTests.XUnitTests.CalculatorTests] Exception_In_TargetTest",
},
Object {
"annotation_level": "failure",
"end_line": 39,
"message": "System.Exception : Test",
"path": "DotnetTests.XUnitTests/CalculatorTests.cs",
"start_line": 39,
"title": "[DotnetTests.XUnitTests.CalculatorTests] Exception_In_Test",
},
Object {
"annotation_level": "failure",
"end_line": 27,
"message": "Assert.Equal() Failure
Expected: 3
Actual: 2",
"path": "DotnetTests.XUnitTests/CalculatorTests.cs",
"start_line": 27,
"title": "[DotnetTests.XUnitTests.CalculatorTests] Failing_Test",
},
],
"summary": "**7** tests were completed in **1.061s** with **3** passed, **1** skipped and **3** failed.
| Result | Suite | Tests | Time | Passed ✔️ | Failed ❌ | Skipped ✖️ |
| :---: | :--- | ---: | ---: | ---: | ---: | ---: |