mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Implement NUnit 3 parser.
This commit is contained in:
parent
b34d4b1bfe
commit
49c1f3ae6c
5 changed files with 372 additions and 0 deletions
107
__tests__/__snapshots__/dotnet-nunit.test.ts.snap
Normal file
107
__tests__/__snapshots__/dotnet-nunit.test.ts.snap
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`dotnet-nunit tests report from ./reports/dotnet test results matches snapshot 1`] = `
|
||||
TestRunResult {
|
||||
"path": "fixtures/dotnet-nunit.xml",
|
||||
"suites": Array [
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
TestGroupResult {
|
||||
"name": "CalculatorTests",
|
||||
"tests": Array [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "Is_Even_Number(2)",
|
||||
"result": "success",
|
||||
"time": 0.000622,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"details": " at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 61
|
||||
",
|
||||
"line": undefined,
|
||||
"message": " Expected: True
|
||||
But was: False
|
||||
",
|
||||
"path": undefined,
|
||||
},
|
||||
"name": "Is_Even_Number(3)",
|
||||
"result": "failed",
|
||||
"time": 0.001098,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"details": " at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.Unit\\\\Calculator.cs:line 9
|
||||
at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 33",
|
||||
"line": undefined,
|
||||
"message": "System.DivideByZeroException : Attempted to divide by zero.",
|
||||
"path": undefined,
|
||||
},
|
||||
"name": "Exception_In_TargetTest",
|
||||
"result": "failed",
|
||||
"time": 0.022805,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"details": " at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 39",
|
||||
"line": undefined,
|
||||
"message": "System.Exception : Test",
|
||||
"path": undefined,
|
||||
},
|
||||
"name": "Exception_In_Test",
|
||||
"result": "failed",
|
||||
"time": 0.000528,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"details": " at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 27
|
||||
",
|
||||
"line": undefined,
|
||||
"message": " Expected: 3
|
||||
But was: 2
|
||||
",
|
||||
"path": undefined,
|
||||
},
|
||||
"name": "Failing_Test",
|
||||
"result": "failed",
|
||||
"time": 0.028162,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "Passing_Test",
|
||||
"result": "success",
|
||||
"time": 0.000238,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "Passing_Test_With_Description",
|
||||
"result": "success",
|
||||
"time": 0.000135,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "Skipped_Test",
|
||||
"result": "skipped",
|
||||
"time": 0.000398,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"details": "",
|
||||
"line": undefined,
|
||||
"message": "",
|
||||
"path": undefined,
|
||||
},
|
||||
"name": "Timeout_Test",
|
||||
"result": "failed",
|
||||
"time": 0.014949,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"name": "DotnetTests.NUnitV3Tests.dll.DotnetTests.XUnitTests",
|
||||
"totalTime": undefined,
|
||||
},
|
||||
],
|
||||
"totalTime": 0.230308,
|
||||
}
|
||||
`;
|
||||
Loading…
Add table
Add a link
Reference in a new issue