@testomatio/reporter 0.6.7-beta.1 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/xmlReader.js +4 -3
- package/package.json +1 -1
package/lib/xmlReader.js
CHANGED
|
@@ -27,6 +27,8 @@ const options = {
|
|
|
27
27
|
parseTagValue: true,
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
const reduceOptions = {};
|
|
31
|
+
|
|
30
32
|
class XmlReader {
|
|
31
33
|
|
|
32
34
|
constructor(opts = {}) {
|
|
@@ -78,6 +80,7 @@ class XmlReader {
|
|
|
78
80
|
}
|
|
79
81
|
const { testsuite, name, tests, failures, errors } = jsonSuite;
|
|
80
82
|
|
|
83
|
+
reduceOptions.preferClassname = this.stats.language === 'python';
|
|
81
84
|
const resultTests = processTestSuite(testsuite);
|
|
82
85
|
|
|
83
86
|
const hasFailures = resultTests.filter(t => t.status === 'failed').length > 0;
|
|
@@ -323,8 +326,6 @@ function reduceTestCases(prev, item) {
|
|
|
323
326
|
// prepend system output
|
|
324
327
|
stack = `${testCaseItem['system-out'] || testCaseItem.log || ''}\n\n${stack}`.trim()
|
|
325
328
|
|
|
326
|
-
const preferClassname = this.stats.language === 'python';
|
|
327
|
-
|
|
328
329
|
prev.push({
|
|
329
330
|
create: true,
|
|
330
331
|
file,
|
|
@@ -334,7 +335,7 @@ function reduceTestCases(prev, item) {
|
|
|
334
335
|
run_time: testCaseItem.time,
|
|
335
336
|
status: (testCaseItem.failure || testCaseItem.error) ? 'failed' : 'passed',
|
|
336
337
|
title: testCaseItem.name,
|
|
337
|
-
suite_title: preferClassname ? testCaseItem.classname : item.name || testCaseItem.classname,
|
|
338
|
+
suite_title: reduceOptions.preferClassname ? testCaseItem.classname : item.name || testCaseItem.classname,
|
|
338
339
|
})
|
|
339
340
|
});
|
|
340
341
|
return prev;
|