Skip to content

Commit

Permalink
Fixing issue JENKINS-32202: Links should point to testng report when …
Browse files Browse the repository at this point in the history
…showing results for testng
  • Loading branch information
menonvarun committed Dec 25, 2015
1 parent c1be82d commit 2f9e762
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -21,7 +21,7 @@ public void addPackage(Integer buildNumber, TabulatedResult packageResult, Strin
packageInfo = new PackageInfo();
packageInfo.setName(packageName);
}
packageInfo.putPackageResult(buildNumber, packageResult, url + "testReport/" + packageResult.getName());
packageInfo.putPackageResult(buildNumber, packageResult, url + getResultUrl(packageResult) +"/" + packageResult.getName());
packageResults.put(packageName, packageInfo);
}

Expand All @@ -36,4 +36,13 @@ public JSONObject getJsonObject() {
public Map<String, PackageInfo> getPackageResults() {
return this.packageResults;
}

protected String getResultUrl(TabulatedResult result){
boolean isTestng = result.getClass().getName().startsWith("hudson.plugins.testng.results");
if(isTestng){
return "testngreports";
} else {
return "testReport";
}
}
}

0 comments on commit 2f9e762

Please sign in to comment.