Karate - How to get one cucumber report generated instead of one for each feature file

Viewed 144

In my Karate runner I am using .outputCucumberJson(true) as shown below to generate a Cucumber Report (in order to upload this back to our XRAY tests):

class KarateRunnerTest {

    @Test
    void testParallel() {
        Results results = Runner.path("classpath:apiTesting/karateFeatureFiles/")
                .outputCucumberJson(true)
                .parallel(5);
        assertEquals(0, results.getFailCount(), results.getErrorMessages());
    }

}

However, it is producing one report for each Feature File. Is there a way for it to just generate one report for all Feature Files?

1 Answers

So this currently can't be done in Karate.

As a workaround I used a little npm tool called 'cucumber-json-merge'.

This merged the reports into 1 and seems to work fine.

Related