Basic configuration for API testing.
Java 11 is needed to build and run application. Gradle is not required as it is provided embedded in application as wrapper.
Application can be built using Gradle wrapper. Run this command under project root directory.
./gradlew gradle clean assemble
or
gradlew.bat gradle clean assemble
This step is responsible for application, building and packaging.
WIP – Main.java contains runnable method that works from IDE.
SpringBoot alternative is not considered in this example, but it could be beneficial in some cases.
Run as step of CI tool or use standalone executor karate.jar
available here https://github.com/intuit/karate/wiki/ZIP-Release
java -jar karate.jar my-test.feature
Execution is configurable by Environment Switching, environments are described in karate-config.js
file
and can be switched, for example by setting -Dkarate.env=prod
, tags can be enabled or disabled in same manner,
for example -Dkarate.options="--tags ~@ignore"
using karate.jar
execution.
build/karate.log
- Parallel execution timeline
target/surefire-reports/timeline.html
- Cucumber report
build/cucumber-html-reports