Added readme for tag reports and catered for when there are no tags

This commit is contained in:
Kingsley Hendrickse 2012-05-10 09:48:06 +01:00
parent e971a554ac
commit 563fd738f3
10 changed files with 72 additions and 56 deletions

BIN
.README/tag-overview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
.README/tag-report.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -42,6 +42,15 @@ And useful information for failures:
![feature specific page passing]
(https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin/raw/master/.README/feature-failed.png)
If you have tags in your cucumber features you can see a tag overview:
![Tag overview]
(https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin/raw/master/.README/tag-overview.png)
And you can drill down into tag specific reports:
![Tag report]
(https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin/raw/master/.README/tag-report.png)
Make sure you have configured cucumber-jvm to run with the JUnit runner and to generate a json report:
package net.masterthought.example;

View File

@ -10,7 +10,7 @@
<groupId>net.masterthought.jenkins</groupId>
<artifactId>cucumber-reports</artifactId>
<version>0.0.5</version>
<version>0.0.8</version>
<packaging>hpi</packaging>
<!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need -->

View File

@ -135,7 +135,6 @@ public class FeatureReportGenerator {
context.put("total_skipped", getTotalTagSkipped());
context.put("chart_data", XmlChartBuilder.StackedColumnChart(allTags));
context.put("total_duration", getTotalTagDuration());
context.put("time_stamp", timeStamp());
context.put("jenkins_base", pluginUrlPath);
generateReport("tag-overview.html", featureOverview, context);

View File

@ -1,22 +1,23 @@
package net.masterthought.jenkins;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class Runner {
public static void main(String[] args) throws Exception {
File rd = new File("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports");
List<String> list = new ArrayList<String>();
list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/french.json");
list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/co_cucumber.json");
list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/ccp_cucumber.json");
list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/ss_cucumber.json");
FeatureReportGenerator featureReportGenerator = new FeatureReportGenerator(list,rd,"","15","aaaaa");
featureReportGenerator.generateReports();
}
}
//package net.masterthought.jenkins;
//
//
//import java.io.File;
//import java.util.ArrayList;
//import java.util.List;
//
//public class Runner {
//
// public static void main(String[] args) throws Exception {
// File rd = new File("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports");
// List<String> list = new ArrayList<String>();
// list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/french.json");
// list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/co_cucumber.json");
// list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/ccp_cucumber.json");
// list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/ss_cucumber.json");
// list.add("/Users/kings/.jenkins/jobs/aaaaa/builds/15/cucumber-html-reports/local.json");
//
// FeatureReportGenerator featureReportGenerator = new FeatureReportGenerator(list,rd,"","15","aaaaa");
// featureReportGenerator.generateReports();
//
// }
//}

View File

@ -18,7 +18,7 @@ public class TagObject {
public String getTagName() {
return tagName;
}
public String getFileName(){
return tagName.replace("@","").trim() + ".html";
}

View File

@ -10,7 +10,7 @@ public class XmlChartBuilder {
}
public static String StackedColumnChart(List<TagObject> tagObjectList){
return "<chart><axis_category shadow='low' size='10' color='FFFFFF' alpha='75' /><axis_ticks value_ticks='true' category_ticks='true' minor_count='1' /><axis_value shadow='low' size='10' color='FFFFFF' alpha='75' /><chart_border top_thickness='0' bottom_thickness='2' left_thickness='2' right_thickness='0' /><chart_data><row><null/>"+generateRowsForColumnChart(tagObjectList)+"</row>"+generateColumnsForColumnChart(tagObjectList)+"</chart_data><chart_grid_h thickness='1' type='solid' /><chart_grid_v thickness='1' type='solid' /><chart_rect x='80' y='60' width='320' height='150' positive_color='888888' positive_alpha='50' /><chart_pref rotation_x='15' rotation_y='0' min_x='0' max_x='80' min_y='0' max_y='60' /><chart_type>stacked 3d column</chart_type><filter><shadow id='high' distance='5' angle='45' alpha='35' blurX='15' blurY='15' /><shadow id='low' distance='2' angle='45' alpha='50' blurX='5' blurY='5' /></filter><legend shadow='high' x='35' y='250' width='410' height='50' margin='20' fill_color='000000' fill_alpha='7' line_color='000000' line_alpha='0' line_thickness='0' layout='horizontal' size='12' color='000000' alpha='50' /><tooltip color='ffffcc' alpha='80' size='12' background_color_1='444488' background_alpha='75' shadow='low' /><series_color><color>C5D88A</color><color>D88A8A</color><color>2DEAEC</color></series_color><series bar_gap='0' set_gap='20' /></chart>";
return "<chart><axis_category shadow='low' size='10' color='FFFFFF' alpha='75' orientation='diagonal_down' /><axis_ticks value_ticks='true' category_ticks='true' minor_count='1' /><axis_value shadow='low' size='10' color='FFFFFF' alpha='75' /><chart_border top_thickness='0' bottom_thickness='2' left_thickness='2' right_thickness='0' /><chart_data><row><null/>"+generateRowsForColumnChart(tagObjectList)+"</row>"+generateColumnsForColumnChart(tagObjectList)+"</chart_data><chart_grid_h thickness='1' type='solid' /><chart_grid_v thickness='1' type='solid' /><chart_rect x='80' y='30' width='470' height='150' positive_color='888888' positive_alpha='50' /><chart_pref rotation_x='15' rotation_y='0' min_x='0' max_x='80' min_y='0' max_y='60' /><chart_type>stacked 3d column</chart_type><filter><shadow id='high' distance='5' angle='45' alpha='35' blurX='15' blurY='15' /><shadow id='low' distance='2' angle='45' alpha='50' blurX='5' blurY='5' /></filter><legend shadow='high' x='75' y='270' width='470' height='50' margin='20' fill_color='000000' fill_alpha='7' line_color='000000' line_alpha='0' line_thickness='0' layout='horizontal' size='12' color='000000' alpha='50' /><tooltip color='ffffcc' alpha='80' size='12' background_color_1='444488' background_alpha='75' shadow='low' /><series_color><color>C5D88A</color><color>D88A8A</color><color>2DEAEC</color></series_color><series bar_gap='0' set_gap='20' /></chart>";
}

View File

@ -146,6 +146,12 @@
<div class="container_12">
<div class="grid_12">
#if($tags.isEmpty())
<div><p>You have no tags in your cucumber features</p></div>
#else
<div style="text-align:center;"><script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
@ -155,8 +161,8 @@
if(hasRightVersion) {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
'width', '480',
'height', '300',
'width', '600',
'height', '350',
'scale', 'noscale',
'salign', 'TL',
'bgcolor', '#777788',
@ -245,6 +251,7 @@
</div>
</div>
#end
<div class="container_12">
<div class="grid_12 hr"></div>

View File

@ -1,28 +1,28 @@
Wed May 09 17:01:28 BST 2012 [debug] AvalonLogChute initialized using file 'velocity.log'
Wed May 09 17:01:28 BST 2012 [trace] *******************************************************************
Wed May 09 17:01:28 BST 2012 [debug] Starting Jakarta Velocity v1.5-SNAPSHOT (compiled: 2006-07-21 06:25:35)
Wed May 09 17:01:28 BST 2012 [trace] RuntimeInstance initializing.
Wed May 09 17:01:28 BST 2012 [debug] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
Wed May 09 17:01:28 BST 2012 [debug] Trying to use logger class org.apache.velocity.runtime.log.AvalonLogChute
Wed May 09 17:01:28 BST 2012 [debug] Using logger class org.apache.velocity.runtime.log.AvalonLogChute
Wed May 09 17:01:28 BST 2012 [debug] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
Wed May 09 17:01:28 BST 2012 [debug] ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
Wed May 09 17:01:28 BST 2012 [trace] ClasspathResourceLoader : initialization complete.
Wed May 09 17:01:28 BST 2012 [debug] ResourceCache: initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
Wed May 09 17:01:28 BST 2012 [trace] Default ResourceManager initialization complete.
Wed May 09 17:01:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
Wed May 09 17:01:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
Wed May 09 17:01:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
Wed May 09 17:01:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Include
Wed May 09 17:01:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
Wed May 09 17:01:28 BST 2012 [debug] Created '20' parsers.
Wed May 09 17:01:28 BST 2012 [trace] Velocimacro : initialization starting.
Wed May 09 17:01:28 BST 2012 [debug] Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm
Wed May 09 17:01:28 BST 2012 [debug] Velocimacro : Default library not found.
Wed May 09 17:01:28 BST 2012 [debug] Velocimacro : allowInline = true : VMs can be defined inline in templates
Wed May 09 17:01:28 BST 2012 [debug] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
Wed May 09 17:01:28 BST 2012 [debug] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
Wed May 09 17:01:28 BST 2012 [debug] Velocimacro : autoload off : VM system will not automatically reload global library macros
Wed May 09 17:01:28 BST 2012 [trace] Velocimacro : initialization complete.
Wed May 09 17:01:28 BST 2012 [trace] RuntimeInstance successfully initialized.
Wed May 09 17:01:28 BST 2012 [debug] ResourceManager : found templates/tagOverview.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
Thu May 10 09:44:28 BST 2012 [debug] AvalonLogChute initialized using file 'velocity.log'
Thu May 10 09:44:28 BST 2012 [trace] *******************************************************************
Thu May 10 09:44:28 BST 2012 [debug] Starting Jakarta Velocity v1.5-SNAPSHOT (compiled: 2006-07-21 06:25:35)
Thu May 10 09:44:28 BST 2012 [trace] RuntimeInstance initializing.
Thu May 10 09:44:28 BST 2012 [debug] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
Thu May 10 09:44:28 BST 2012 [debug] Trying to use logger class org.apache.velocity.runtime.log.AvalonLogChute
Thu May 10 09:44:28 BST 2012 [debug] Using logger class org.apache.velocity.runtime.log.AvalonLogChute
Thu May 10 09:44:28 BST 2012 [debug] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
Thu May 10 09:44:28 BST 2012 [debug] ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
Thu May 10 09:44:28 BST 2012 [trace] ClasspathResourceLoader : initialization complete.
Thu May 10 09:44:28 BST 2012 [debug] ResourceCache: initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
Thu May 10 09:44:28 BST 2012 [trace] Default ResourceManager initialization complete.
Thu May 10 09:44:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
Thu May 10 09:44:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
Thu May 10 09:44:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
Thu May 10 09:44:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Include
Thu May 10 09:44:28 BST 2012 [debug] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
Thu May 10 09:44:28 BST 2012 [debug] Created '20' parsers.
Thu May 10 09:44:28 BST 2012 [trace] Velocimacro : initialization starting.
Thu May 10 09:44:28 BST 2012 [debug] Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm
Thu May 10 09:44:28 BST 2012 [debug] Velocimacro : Default library not found.
Thu May 10 09:44:28 BST 2012 [debug] Velocimacro : allowInline = true : VMs can be defined inline in templates
Thu May 10 09:44:28 BST 2012 [debug] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
Thu May 10 09:44:28 BST 2012 [debug] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
Thu May 10 09:44:28 BST 2012 [debug] Velocimacro : autoload off : VM system will not automatically reload global library macros
Thu May 10 09:44:28 BST 2012 [trace] Velocimacro : initialization complete.
Thu May 10 09:44:28 BST 2012 [trace] RuntimeInstance successfully initialized.
Thu May 10 09:44:28 BST 2012 [debug] ResourceManager : found templates/tagOverview.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader