I've noticed that if I execute parallel tests with junit5 karate would backup reports by default:
//have report backup
@Test
void runParallel() {
Results results = Karate.run(String.join(File.separator,"classpath:steps")).tags("@Read")
.reportDir(KARATE_REPORT_DIR)
.outputJunitXml(true)
.parallel(5);
assertEquals(0, results.getFailCount(), results.getErrorMessages());
}
But not the same when running a single test with karate-junit5 interface, even with backupReportDir(true)
// no report backup
@Karate.Test
Karate run(){
return Karate.run("classpath:steps").tags("@Read")
.backupReportDir(true)
.reportDir(KARATE_REPORT_DIR)
.outputJunitXml(true);
}
Is it designed intentional or an issue?
my pom
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
CodePudding user response:
I honestly don't remember. I personally don't consider this a high priority so you are welcome to dive into the code and contribute a PR.