* @param result\r
* the result to dump\r
*/\r
- protected void generate(StructureRegistry registry) {\r
+ protected void generate(StructureRegistry<TreeSPath> registry) {\r
StringBuffer buf = new StringBuffer("");\r
buf.append("<html>\n");\r
buf.append("<header>");\r
- buf.append("<title>Result #").append(result.getTestResultId());\r
+ buf.append("<title>Result #").append(result.getUuid());\r
buf.append("</title>\n");\r
report.addStyles(buf);\r
buf.append("</header>\n");\r
\r
// Header\r
buf.append("<a name=\"top\"/>\n");\r
- buf.append("<h1>Result #").append(result.getTestResultId()).append(\r
- "</h1>\n");\r
+ buf.append("<h1>Result #").append(result.getUuid()).append("</h1>\n");\r
Date closeDate = result.getCloseDate();\r
if (closeDate == null) {\r
buf.append("[Not closed]");\r
}\r
}\r
\r
- private void generateToc(StringBuffer buf, StructureRegistry registry) {\r
+ private void generateToc(StringBuffer buf,\r
+ StructureRegistry<TreeSPath> registry) {\r
buf.append("<h2>Overview</h2>\n");\r
SortedMap<TreeSPath, Integer> toc = new TreeMap<TreeSPath, Integer>();\r
for (TreeSPath path : result.getResultParts().keySet()) {\r
\r
buf.append("<tr><td class=\"").append(\r
isFailed ? "failed" : "passed").append("\">");\r
- int depth = path.depth();\r
+ int depth = path.getDepth();\r
for (int i = 0; i < depth; i++) {\r
buf.append(" ");\r
}\r
if (registry != null) {\r
StructureElement element = registry.getElement(path);\r
if (element != null) {\r
- buf.append(element.getDescription());\r
+ buf.append(element.getLabel());\r
} else {\r
buf.append(path.getName());\r
}\r
buf.append("<hr/>\n");\r
}\r
\r
- private void generatePartsList(StringBuffer buf, StructureRegistry registry) {\r
+ private void generatePartsList(StringBuffer buf,\r
+ StructureRegistry<TreeSPath> registry) {\r
for (TreeSPath path : result.getResultParts().keySet()) {\r
buf.append("<p>\n");\r
buf.append("<a name=\"").append(anchor(path)).append("\"></a>");\r
int displayedIndex = 1;// for display only\r
for (TestResultPart part : subList.getParts()) {\r
SimpleResultPart sPart = (SimpleResultPart) part;\r
+ buf.append("Related Test Run Id:").append(\r
+ sPart.getTestRunUuid()).append("<br/>\n");\r
String clss = "";\r
if (sPart.getStatus().equals(TestStatus.PASSED)) {\r
clss = "passed";\r
if (sPart.getStatus().equals(TestStatus.ERROR)) {\r
buf\r
.append("<p><b>An unexpected error prevented the test to run properly.</b>");\r
- Throwable exception = sPart.getException();\r
- if (exception != null) {\r
- StringWriter writer = new StringWriter();\r
- exception.printStackTrace(new PrintWriter(writer));\r
- buf.append("<br/><pre>");\r
- buf.append(writer.toString());\r
- buf.append("</pre>");\r
- IOUtils.closeQuietly(writer);\r
- }\r
+ buf.append(sPart.getExceptionMessage());\r
buf.append("</p>");\r
}\r
buf.append("</td>");\r
return path.getAsUniqueString().replace(path.getSeparator(), '_');\r
}\r
\r
- private void describedPath(TreeSPath path, StructureRegistry registry,\r
- StringBuffer buf) {\r
+ private void describedPath(TreeSPath path,\r
+ StructureRegistry<TreeSPath> registry, StringBuffer buf) {\r
// StringBuffer buf = new StringBuffer("");\r
if (path.getParent() != null) {\r
describedPath(path.getParent(), registry, buf);\r
if (registry != null) {\r
StructureElement element = registry.getElement(path);\r
if (element != null) {\r
- description = element.getDescription();\r
+ description = element.getLabel();\r
}\r
}\r
buf.append('/').append(description);\r