diff --git a/lib/runner/writers/j-unit-writer.js b/lib/runner/writers/j-unit-writer.js index 5d511576..b6330600 100644 --- a/lib/runner/writers/j-unit-writer.js +++ b/lib/runner/writers/j-unit-writer.js @@ -95,7 +95,7 @@ module.exports = jUnitWriter = { let testcase = testsuiteTag.ele('testcase'); testCount++; - testcase.att('name', `${action.component}.${action.action}`); + testcase.att('name', `${testRun.report.testName}:${action.component}.${action.action}`); jUnitWriter._setStatus(action, testcase); jUnitWriter._setTime(action, testcase); diff --git a/test/unit/lib/runner/writers/j-unit-writer-tests.js b/test/unit/lib/runner/writers/j-unit-writer-tests.js index 4728417d..d56d02ae 100644 --- a/test/unit/lib/runner/writers/j-unit-writer-tests.js +++ b/test/unit/lib/runner/writers/j-unit-writer-tests.js @@ -538,7 +538,7 @@ describe('lib/runner/writers/j-unit-writer.js', function() { it(`should call testcase.att once with the string 'name' and the action's component and action name`, function() { jUnitWriter._createReportWithActions(report); - expect(testcase.att.args).to.deep.equal([['name', 'myComponent.MY_ACTION']]); + expect(testcase.att.args).to.deep.equal([['name', '1234_test.json:myComponent.MY_ACTION']]); }); it(`should call jUnitWrtier._setStatus once with the action and the testcase`, function() {