Skip to content

Instantly share code, notes, and snippets.

@saikrishna321
Created March 28, 2016 17:53
Show Gist options
  • Select an option

  • Save saikrishna321/23182640eb13292972ea to your computer and use it in GitHub Desktop.

Select an option

Save saikrishna321/23182640eb13292972ea to your computer and use it in GitHub Desktop.
public class HtmlReporter {
static File reportOutputDirectory = new File(System.getProperty("user.dir")+"/target"+"/");
static List<String> list = new ArrayList<String>();
public void listFilesForFolder(final File folder) {
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isDirectory()) {
listFilesForFolder(fileEntry);
} else if (fileEntry.getName().endsWith(".json")) {
list.add(reportOutputDirectory +"/"+fileEntry.getName());
}
}
}
public void generateReports() throws VelocityException, IOException {
listFilesForFolder(reportOutputDirectory);
String pluginUrlPath = "";
String buildNumber = "1";
String buildProject = "cucumber-appium-parallel";
boolean skippedFails = true;
boolean pendingFails = true;
boolean undefinedFails = true;
boolean missingFails = true;
boolean flashCharts = true;
boolean runWithJenkins = true;
boolean highCharts = true;
boolean parallelTesting = true;
ReportBuilder reportBuilder = new ReportBuilder(list, reportOutputDirectory,
pluginUrlPath, // String pluginUrlPath
buildNumber, // String buildNumber
buildProject, // String buildProject,
skippedFails, // boolean skippedFails,
pendingFails, // boolean pendingFails,
undefinedFails, // boolean undefinedFails,
missingFails, // boolean missingFails
flashCharts, // boolean flashCharts,
runWithJenkins, // boolean runWithJenkins,
false, // boolean artifactsEnabled,
"", // String artifactConfig
highCharts, // boolean highCharts
parallelTesting // boolean parallelTesting
);
reportBuilder.generateReports();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment