Reputation: 11
Hello i new in karate framewrok, i need help to integrate the graphics report of cucumber in karate, i view a function in a video or a post but the people dont tell how libraries import tu use the same.
The function that i call is this:
private static void generateReport() {
String karateOutputPath = "target/surefire-reports";
Collection<File> jsonFiles = FileUtils.listFiles(new File(karateOutputPath), new String[] {"json"}, true);
List<String> jsonPaths = new ArrayList(jsonFiles.size());
for(File file: jsonFiles)
{
jsonPaths.add(file.getAbsolutePath());
}
Configuration config = new Configuration(new File("target"), "demo");
ReportBuilder reportBuilder = new ReportBuilder(jsonPaths, config);
reportBuilder.generateReports();
}
i dont know how library need to reportBuilder, listFiles, etc.
Thanks
Upvotes: 0
Views: 259
Reputation: 58058
This is explained in detail in the documentation, please read it: https://github.com/intuit/karate/tree/master/karate-demo#example-report
Upvotes: 2