Merge pull request #39 from ChrisKozak/master

Updates to work with cucumber-reporting
This commit is contained in:
Kingsley Hendrickse 2012-10-08 15:19:06 -07:00
commit f3fe26bb80
3 changed files with 21 additions and 9 deletions

View File

@ -9,7 +9,7 @@
<groupId>net.masterthought.jenkins</groupId>
<artifactId>cucumber-reports</artifactId>
<version>0.0.15</version>
<version>0.0.18</version>
<packaging>hpi</packaging>
<scm>
@ -42,7 +42,7 @@
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.0.14-SNAPSHOT</version>
<version>0.0.18-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@ -95,9 +95,20 @@ public class CucumberReportPublisher extends Recorder {
String[] jsonReportFiles = findJsonFiles(targetBuildDirectory);
if (jsonReportFiles.length != 0) {
listener.getLogger().println("[CucumberReportPublisher] Generating HTML reports");
ReportBuilder reportBuilder = new ReportBuilder(fullPathToJsonFiles(jsonReportFiles, targetBuildDirectory), targetBuildDirectory, pluginUrlPath, buildNumber, buildProject, skippedFails, undefinedFails, !noFlashCharts, true);
try {
ReportBuilder reportBuilder = new ReportBuilder(
fullPathToJsonFiles(jsonReportFiles, targetBuildDirectory),
targetBuildDirectory,
pluginUrlPath,
buildNumber,
buildProject,
skippedFails,
undefinedFails,
!noFlashCharts,
true,
false,
"");
reportBuilder.generateReports();
buildResult = reportBuilder.getBuildStatus();
} catch (Exception e) {
@ -128,7 +139,7 @@ public class CucumberReportPublisher extends Recorder {
public static class DescriptorImpl extends BuildStepDescriptor<Publisher> {
@Override
public String getDisplayName() {
return Messages.CucumberReportPublisher_DisplayName();
return "Publish cucumber results as a report";
}

View File

@ -10,21 +10,22 @@
When submitted, it will be passed to the corresponding constructor parameter.
-->
<f:advanced>
<f:entry title="${%JsonReportsPath}" field="jsonReportDirectory" description="${%JsonReportsPathDescription}">
<f:entry title="Json Reports Path" field="jsonReportDirectory" description="The path relative to the workspace of the json reports generated by cucumber-jvm e.g. target - leave empty to let the plugin find them automagically">
<f:textbox />
</f:entry>
<f:entry title="${%PluginUrlPath}" field="pluginUrlPath" description="${%PluginUrlPathDescription}">
<f:entry title="Plugin Url Path" field="pluginUrlPath" description="The path to the jenkins user content url e.g. http://host:port[/jenkins/]plugin - leave empty if jenkins url root is host:port">
<f:textbox />
</f:entry>
<f:entry title="${%SkippedStepsFailTheBuild}" field="skippedFails" description="${%SkippedStepsFailTheBuildDescription}">
<f:entry title="Skipped Steps Fail the Build" field="skippedFails" description="Tick this if you want skipped steps to cause the build to fail">
<f:checkbox />
</f:entry>
<f:entry title="${%PendingStepsFailTheBuild}" field="undefinedFails" description="${%PendingStepsFailTheBuildDescription}">
<f:entry title="Pending Steps Fail the Build" field="undefinedFails" description="Tick this if you want pending steps to cause the build to fail">
<f:checkbox />
</f:entry>
<f:entry title="${%TurnOffFlashCharts}" field="noFlashCharts" description="${%TurnOffFlashChartsDescription}">
<f:entry title="Turn Off Flash Charts" field="noFlashCharts" description="Tick this if you want to use javascript charts instead of flash charts">
<f:checkbox />
</f:entry>
</f:advanced>
</j:jelly>