@testomatio/reporter 0.6.5 → 0.6.7-beta.1

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/Changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.6.6
2
+
3
+ * JUnit reporter: prefer suite title over testcase classname in a report
4
+
1
5
  # 0.6.5
2
6
 
3
7
  * Fixed test statuses for runs in JUnit reporter
package/lib/xmlReader.js CHANGED
@@ -323,6 +323,8 @@ function reduceTestCases(prev, item) {
323
323
  // prepend system output
324
324
  stack = `${testCaseItem['system-out'] || testCaseItem.log || ''}\n\n${stack}`.trim()
325
325
 
326
+ const preferClassname = this.stats.language === 'python';
327
+
326
328
  prev.push({
327
329
  create: true,
328
330
  file,
@@ -332,13 +334,14 @@ function reduceTestCases(prev, item) {
332
334
  run_time: testCaseItem.time,
333
335
  status: (testCaseItem.failure || testCaseItem.error) ? 'failed' : 'passed',
334
336
  title: testCaseItem.name,
335
- suite_title: testCaseItem.classname || item.name,
337
+ suite_title: preferClassname ? testCaseItem.classname : item.name || testCaseItem.classname,
336
338
  })
337
339
  });
338
340
  return prev;
339
341
  }
340
342
 
341
343
  function processTestSuite(testsuite) {
344
+ if (!testsuite) return [];
342
345
  if (testsuite.testsuite) return processTestSuite(testsuite.testsuite)
343
346
 
344
347
  let suites = testsuite;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "0.6.5",
3
+ "version": "0.6.7-beta.1",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "repository": "git@github.com:testomatio/reporter.git",