Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Don't show broken image when no test results are available #7

merged 1 commit into from

2 participants

Carsten Pfeiffer Si Westcott
Carsten Pfeiffer

When a new Jenkins job is set up (or when otherwise no test results are available), the project page will show a broken image coming from the trend report.

Si Westcott swestcott merged commit 70e9bb1 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
10 src/main/java/hudson/plugins/fitnesse/
@@ -36,8 +36,18 @@ public String getUrlName() {
* Used in floatingBox.jelly
+ public boolean hasTrend() {
+ return getLatestResults() != null;
+ }
+ /**
+ * Used in floatingBox.jelly
+ */
public History getTrend() {
FitnesseResultsAction latestResults = getLatestResults();
+ if (latestResults == null) {
+ return null;
+ }
FitnesseResults result = latestResults.getResult();
return new History(result,500,200);
3  src/main/resources/hudson/plugins/fitnesse/FitnesseProjectAction/floatingBox.jelly
@@ -1,10 +1,13 @@
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler"
xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"
xmlns:f="/lib/form" xmlns:i="jelly:fmt">
+ <j:if test="${action.hasTrend()}">
<div class="test-trend-caption">
${%FitNesse Results Trend}
<img src="fitnesse/trend/countGraph/png" lazymap="fitnesse/trend/countGraph/map" alt="[FitNesse results trend chart]"/>
+ </j:if>
Something went wrong with that request. Please try again.