Reputation: 391
How can I run karate tests in parallel without using spring boot framework which is part of karate-demo code ?
Upvotes: 1
Views: 619
Reputation: 4239
No, you don't need spring boot framework for running karate test in parallel.
If you are having your own project with your own api/any public api and your own karate tests written for those api you don't need spring boot.
Spring boot is only required if you want to use karate-demo project, as it uses spring boot as sort of mock web service for the tests written on karate-demo.
so if you don't want to have spring boot don't use karate-demo.
Now how to run your tests in parallel,
a sample from karate documentation,
@Test
public void testParallel() {
KarateStats stats = CucumberRunner.parallel(getClass(), 5, "target/surefire-reports");
assertTrue("scenarios failed", stats.getFailCount() == 0);
}
here number of parallel threads defined as 5
, you can define as your need.
for more details i suggest you read this documentation,
Running parallel tests using karate
Upvotes: 2