Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
break
// if at least one step failed
case 'failure':
// mark as failure and output failure messages
testCase
.failure(messages.join('\n\n'))
break
// if a scenario runs without any failed or skipped steps
default:
// successful tests are already handled
}
})
})
// persistent data
builder.writeTo(options.output)
}
JUnitXmlReporter.prototype.generate = function() {
var resultFilePath = this.createFolderStructureAndFilePath('.xml');
var resultFolderPath = path.dirname(resultFilePath);
this.replaceScreenshotsWithFiles(resultFolderPath);
// the 'results' object can contain a single test suite result or an array of multiple parallel test results
if (this.results instanceof Array) {
// go through multiple results
_.each(this.results, function(resultSet) {
populateSuiteResults(resultSet, builder);
});
} else {
populateSuiteResults(this.results, builder);
}
builder.writeTo(resultFilePath);
return resultFilePath;
};
.className(packageName + '.' + ruleResult.id)
.name(violation.target)
.failure(failure)
.stacktrace(stacktrace);
});
});
result.passes.forEach(function (ruleResult) {
ruleResult.nodes.forEach(function (pass) {
suite.testCase()
.className(packageName + '.' + ruleResult.id)
.name(pass.target);
});
});
junitReportBuilder.writeTo(outFile);
};
generate(results) {
var resultFilePath = this.createFolderStructureAndFilePath('.xml');
var resultFolderPath = path.dirname(resultFilePath);
this.replaceScreenshotsWithFiles(results, resultFolderPath);
for (let result of results) {
for (let suite of result.suites) {
this._populateSuiteResults(suite, builder);
}
}
builder.writeTo(resultFilePath);
return resultFilePath;
}
result.metric +
' is ' +
result.friendlyValue +
' and limit ' +
result.limitType +
' ' +
result.friendlyLimit +
' ' +
url
);
}
}
}
const file = path.join(dir, 'junit.xml');
log.info('Write junit budget to %s', path.resolve(file));
builder.writeTo(file);
};
return new Promise(function (resolve, reject) {
var testReportFilename = config.testReportFileName || config.ciReport.testReportFileName;
testReportFilename = testReportFilename.replace(/\.xml$/, '') + '.xml';
var destination = path.join(config.ci_report, testReportFilename);
try {
builder.writeTo(destination);
logger.success('jUnit report written to: ' + destination);
resolve();
} catch (e) {
return reject(e);
}
});
}