in src/reporters/junit.ts [76:112]
override onStepEnd(journey: Journey, step: Step) {
if (!this.#journeyMap.has(journey.name)) {
return;
}
const entry = this.#journeyMap.get(journey.name);
const caseEntry = {
name: 'testcase',
attributes: {
name: step.name,
classname: journey.name + ' ' + step.name,
time: step.duration,
},
children: [],
};
entry.attributes.tests++;
if (step.status === 'failed') {
caseEntry.children.push({
name: 'failure',
attributes: {
message: step.error?.message,
type: step.error?.name,
},
text: stripAnsiCodes(serializeError(step.error).stack),
});
entry.attributes.failures++;
} else if (step.status === 'skipped') {
caseEntry.children.push({
name: 'skipped',
attributes: {
message: 'previous step failed',
},
});
entry.attributes.skipped++;
}
entry.children.push(caseEntry);
}