Skip to content

Commit

Permalink
More compact layout of SuiteExecutionReport
Browse files Browse the repository at this point in the history
This commit aligns the format of the SuiteExecutionReport to the more
compact and more readable TestTextFormatter format:
* Duration put to the front
* Page name and path are in separate columns
* Instead of an absolute path only a relative path is printed.
  • Loading branch information
six42 committed Mar 31, 2015
1 parent 6509b04 commit eb41839
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/fitnesse/reporting/history/SuiteExecutionReport.java
Expand Up @@ -160,6 +160,14 @@ public String getRelativePageName() {
return PathParser.parse(pageName).last();
}

public String getPath() {
return PathParser.parse(pageName).parentPath().toString();
}

public String subtractFromFront(String operand){
return PathParser.parse(pageName).parentPath().subtractFromFront(PathParser.parse(operand)).toString();
}

public long getTime() {
return time;
}
Expand Down
13 changes: 9 additions & 4 deletions src/fitnesse/resources/templates/suiteExecutionReport.vm
Expand Up @@ -28,11 +28,13 @@
<th class="numeric">Wrong</th>
<th class="numeric">Ignored</th>
<th class="numeric">Exceptions</th>
<th>Page</th>
#if($suiteExecutionReport.hasRunTimes())
<th class="numeric">Run&nbsp;time&nbsp;(ms)</th>
#end
<th>Page</th>
<th>Path</th>
</tr>
#set ($previousPage = $suiteExecutionReport.getRootPath())
#foreach($pageHistoryReference in $suiteExecutionReport.getPageHistoryReferences())
#set($counts = $pageHistoryReference.getTestSummary())
<tr class="$ExecutionResult.getExecutionResult($pageHistoryReference.pageName, $counts)">
Expand All @@ -48,14 +50,17 @@
<td class="numeric">
$counts.Exceptions
</td>
<td>
<a href="$pageHistoryReference.pageName?pageHistory&resultDate=$pageHistoryReference.getResultDate()">$pageHistoryReference.getPageName()</a>
</td>
#if($suiteExecutionReport.hasRunTimes())
<td class="numeric">
$pageHistoryReference.RunTimeInMillis
</td>
#end
<td>
<a href="$pageHistoryReference.pageName?pageHistory&resultDate=$pageHistoryReference.getResultDate()">$pageHistoryReference.getRelativePageName()</a>
</td>
<td>
$pageHistoryReference.subtractFromFront($previousPage)
</td>
</tr>
#end
</table>
Expand Down

0 comments on commit eb41839

Please sign in to comment.