in maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportRenderer.java [453:532]
private void renderSectionFailureDetails() {
List<ReportTestCase> failures = parser.getFailureDetails(testSuites);
if (failures.isEmpty()) {
return;
}
startSection(getI18nString("surefire", "label.failuredetails"), "Failure_Details");
constructHotLinks();
sink.lineBreak();
startTable();
for (ReportTestCase testCase : failures) {
sink.tableRow();
sink.tableCell();
String type = testCase.getFailureType();
sinkIcon(type);
sink.tableCell_();
sinkCellAnchor(testCase.getName(), toHtmlId(testCase.getFullName()));
sink.tableRow_();
String message = testCase.getFailureMessage();
sink.tableRow();
tableCell("");
sink.tableCell();
// This shall not be subject to #linkPatternedText()
text(message == null ? type : type + ": " + message);
sink.tableCell_();
sink.tableRow_();
String detail = testCase.getFailureDetail();
if (detail != null) {
sink.tableRow();
tableCell("");
sink.tableCell();
SinkEventAttributeSet atts = new SinkEventAttributeSet();
atts.addAttribute(ID, testCase.getName() + toHtmlIdFailure(testCase));
sink.unknown("div", TAG_TYPE_START, atts);
String fullClassName = testCase.getFullClassName();
String errorLineNumber = testCase.getFailureErrorLine();
if (xrefTestLocation != null) {
String path = fullClassName.replace('.', '/');
sink.link(xrefTestLocation + "/" + path + ".html#L" + errorLineNumber);
}
sink.text(fullClassName + ":" + errorLineNumber);
if (xrefTestLocation != null) {
sink.link_();
}
sink.unknown("div", TAG_TYPE_END, null);
sink.tableCell_();
sink.tableRow_();
}
}
endTable();
sink.lineBreak();
endSection();
}