mirror of
https://github.com/dorny/test-reporter.git
synced 2026-03-22 07:52:14 +01:00
Correct test time output
This commit is contained in:
parent
e89b2f3e47
commit
3eeb9fc888
5 changed files with 19 additions and 20 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -759,9 +759,8 @@ class DotnetNunitLegacyParser {
|
|||
}
|
||||
getTestRunResult(path, nunit) {
|
||||
const suites = [];
|
||||
const time = parseFloat(nunit['test-results'].$.time);
|
||||
this.populateTestCasesRecursive(suites, [], nunit['test-results']['test-suite']);
|
||||
return new test_results_1.TestRunResult(path, suites, time);
|
||||
return new test_results_1.TestRunResult(path, suites);
|
||||
}
|
||||
populateTestCasesRecursive(result, suitePath, testSuites) {
|
||||
if (testSuites === undefined) {
|
||||
|
|
@ -803,7 +802,7 @@ class DotnetNunitLegacyParser {
|
|||
existingGroup = new test_results_1.TestGroupResult(groupName, []);
|
||||
existingSuite.groups.push(existingGroup);
|
||||
}
|
||||
existingGroup.tests.push(new test_results_1.TestCaseResult(testCase.$.name.startsWith(suiteName + '.') ? testCase.$.name.substring(suiteName.length + 1) : testCase.$.name, this.getTestExecutionResult(testCase), parseFloat(testCase.$.time), this.getTestCaseError(testCase)));
|
||||
existingGroup.tests.push(new test_results_1.TestCaseResult(testCase.$.name.startsWith(suiteName + '.') ? testCase.$.name.substring(suiteName.length + 1) : testCase.$.name, this.getTestExecutionResult(testCase), testCase.$.time ? parseFloat(testCase.$.time) * 1000 : 0, this.getTestCaseError(testCase)));
|
||||
}
|
||||
getTestExecutionResult(test) {
|
||||
if (test.$.result === 'Failed' || test.failure)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue