();
+// list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/3/cucumber-html-reports/ss_cucumber.json");
+// list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/3/cucumber-html-reports/co_cucumber.json");
+//
+// FeatureReportGenerator featureReportGenerator = new FeatureReportGenerator(list,rd,"","3","aaaa");
+// featureReportGenerator.generateReports();
+//
+// }
+//}
diff --git a/src/main/java/net/masterthought/jenkins/json/Step.java b/src/main/java/net/masterthought/jenkins/json/Step.java
index cc3df85..725d3ac 100644
--- a/src/main/java/net/masterthought/jenkins/json/Step.java
+++ b/src/main/java/net/masterthought/jenkins/json/Step.java
@@ -1,10 +1,14 @@
package net.masterthought.jenkins.json;
+import java.util.Arrays;
+import java.util.List;
+
public class Step {
private String name;
private String keyword;
private Result result;
+ private Row[] rows;
public Step(String name, String keyword) {
this.name = name;
@@ -12,9 +16,46 @@ public class Step {
}
+// public Row getTitleRow(){
+// return rows[0];
+// }
+
+// public List getRows(){
+// return Arrays.asList(rows).subList(1, -1);
+// }
+
+ public Row[] getRows(){
+ return rows;
+ }
+
+ public boolean hasRows(){
+ boolean result = false;
+ if(rows != null){
+ if(rows.length > 0){
+ result = true;
+ }
+ }
+ return result;
+ }
+
public Util.Status getStatus() {
return Util.resultMap.get(result.getStatus());
}
+
+ public String getDataTableClass(){
+ String content = "";
+ Util.Status status = getStatus();
+ if(status == Util.Status.FAILED){
+ content = "failed";
+ } else if(status == Util.Status.PASSED){
+ content = "passed";
+ } else if(status == Util.Status.SKIPPED){
+ content = "skipped";
+ } else {
+ content = "";
+ }
+ return content;
+ }
public String getName(){
String content = "";
diff --git a/src/main/resources/index.jelly b/src/main/resources/index.jelly
index 538998f..c257edd 100644
--- a/src/main/resources/index.jelly
+++ b/src/main/resources/index.jelly
@@ -2,5 +2,5 @@
This view is used to render the installed plugins page.
-->
- This plugin is a sample to explain how to write a Jenkins plugin.
+ This plugin creates pretty cucumber-jvm html reports on jenkins
diff --git a/src/main/resources/templates/featureReport.vm b/src/main/resources/templates/featureReport.vm
index 1cc3f0a..92f2318 100644
--- a/src/main/resources/templates/featureReport.vm
+++ b/src/main/resources/templates/featureReport.vm
@@ -52,6 +52,39 @@ border-color: gray;
background-color: white;
-moz-border-radius: ;
}
+
+table.data-table {
+ color: black;
+ border-width: 1px;
+ border-spacing: 2px;
+ border-style: outset;
+ border-color: #d6d6d6;
+ border-collapse: collapse;
+ background-color: beige;
+}
+table.data-table th {
+ color:black;
+ border-width: 1px;
+ padding: 5px;
+ border-style: inset;
+ border-color: #d6d6d6;
+ background-color: #66CCEE;
+}
+table.data-table td {
+ color:black;
+ text-align: center;
+ border-width: 1px;
+ padding: 5px;
+ border-style: inset;
+ border-color: #d6d6d6;
+ background-color: beige;
+}
+
+.data {
+ padding-left:50px;
+ padding-bottom: 10px;
+ padding-top: 10px;
+}
@@ -88,6 +121,19 @@ background-color: white;
$scenario.getName()
#foreach($step in $scenario.getSteps())
$step.getName()
+ #if($step.hasRows())
+
+
+ #foreach($row in $step.getRows())
+
+ #foreach($cell in $row.getCells())
+ $cell |
+ #end
+
+ #end
+
+
+ #end
#end
#end