Fix JUnit reporter for Intern

Its setup should not depend on FAIL_FAST env variable,
which is responsible for stopping of tests only.

Also, xml file should be saved in the same location as other artifacts
like screenshots.

Change-Id: I18c6ec64906aa5b8dea39a0a837389875ddd6b3e
This commit is contained in:
Julia Aranovich 2016-11-09 15:29:06 +03:00
parent ec7f2f21dd
commit 969a74a0e7
1 changed files with 7 additions and 7 deletions

View File

@ -121,16 +121,16 @@ function runIntern(suites, browser) {
var config = {
environments: [{browserName: browser}],
excludeInstrumentation: true,
reporters: ['Runner', 'tests/functional/screenshot_on_fail']
};
if (process.env.FAIL_FAST === 'false') {
config.reporters.push(
reporters: [
'Runner',
'tests/functional/screenshot_on_fail',
{
id: 'JUnit',
filename: process.env.WORKSPACE + '/nightly_report_' + new Date().getTime() + '.xml'
filename: (process.env.ARTIFACTS || process.cwd()) + '/xml_report_' +
new Date().getTime() + '.xml'
}
);
}
]
};
var configFile = 'tests/functional/config.js';
var configFileContents = 'define(function(){return' + JSON.stringify(config) + '})';
fs.writeFileSync( // eslint-disable-line no-sync