1

enter image description here

Runs is displaying as 1/1.. Is there any way to show the number of scenarios executing while using cucumber html report?

public class TestRunner {

  @Test
    public void testParallel() {
        Results results = Runner.path("src/test/java/Features/KarateTest.feature").parallel(1);
        generateReport(results.getReportDir());
        assertTrue(results.getErrorMessages(), results.getFailCount() == 0);
    }

  public static void generateReport(String karateOutputPath) {
        Collection<File> jsonFiles = FileUtils.listFiles(new File(karateOutputPath), new String[] { "json" }, true);
        List<String> jsonPaths = new ArrayList<String>(jsonFiles.size());
        jsonFiles.forEach(file -> jsonPaths.add(file.getAbsolutePath()));
        Configuration config = new Configuration(new File("target"), "Karate_Test");
        ReportBuilder reportBuilder = new ReportBuilder(jsonPaths, config);
        reportBuilder.generateReports();
    }

}

Aasha
  • 11
  • 1
  • no, please read this to know why. you are welcome to contribute code to improve karate: https://stackoverflow.com/a/65578167/143475 – Peter Thomas Jun 22 '22 at 10:09

0 Answers0