Testing / Karate Framework Interview questions
What is a Karate Runner class?
A Runner class is the Java entry point used to execute Karate feature files from a build tool or IDE, most commonly invoked through JUnit. It specifies which features (and optionally which tags) to run and how many should execute in parallel.
import org.junit.jupiter.api.Test; import com.intuit.karate.junit5.Karate; class UserApiTest { @Karate.Test Karate testUsers() { return Karate.run("classpath:tests/users") .tags("~@ignore") .parallel(5); } }
Beyond kicking off execution, the Runner also produces the results used to generate reports and determine build pass/fail status, which is why it's the piece most commonly wired into CI/CD pipelines rather than running individual feature files by hand.
More Related questions...