private void generateFeatureOverview() throws Exception { int numberTotalPassed = ri.getTotalNumberPassingSteps(); int numberTotalFailed = ri.getTotalNumberFailingSteps(); int numberTotalSkipped = ri.getTotalNumberSkippedSteps(); int numberTotalPending = ri.getTotalNumberPendingSteps(); VelocityEngine ve = new VelocityEngine(); ve.init(getProperties()); Template featureOverview = ve.getTemplate("templates/featureOverview.vm"); VelocityContext context = new VelocityContext(); context.put("build_project", buildProject); context.put("build_number", buildNumber); context.put("features", ri.getFeatures()); context.put("total_features", ri.getTotalNumberOfFeatures()); context.put("total_scenarios", ri.getTotalNumberOfScenarios()); context.put("total_steps", ri.getTotalNumberOfSteps()); context.put("total_passes", numberTotalPassed); context.put("total_fails", numberTotalFailed); context.put("total_skipped", numberTotalSkipped); context.put("total_pending", numberTotalPending); if (flashCharts) { context.put( "step_data", FlashChartBuilder.donutChart( numberTotalPassed, numberTotalFailed, numberTotalSkipped, numberTotalPending)); context.put( "scenario_data", FlashChartBuilder.pieChart(ri.getTotalScenariosPassed(), ri.getTotalScenariosFailed())); } else { JsChartUtil pie = new JsChartUtil(); List<String> stepColours = pie.orderStepsByValue( numberTotalPassed, numberTotalFailed, numberTotalSkipped, numberTotalPending); context.put("step_data", stepColours); context.put("scenarios_passed", ri.getTotalScenariosPassed()); context.put("scenarios_failed", ri.getTotalScenariosFailed()); List<String> scenarioColours = pie.orderScenariosByValue(ri.getTotalScenariosPassed(), ri.getTotalScenariosFailed()); context.put("scenario_data", scenarioColours); } context.put("time_stamp", ri.timeStamp()); context.put("total_duration", ri.getTotalDurationAsString()); context.put("jenkins_base", pluginUrlPath); context.put("fromJenkins", runWithJenkins); context.put("flashCharts", flashCharts); generateReport("feature-overview.html", featureOverview, context); }
public boolean getBuildStatus() { return !(ri.getTotalNumberFailingSteps() > 0); }