GET STARTED
Quickstart
Maven Archetype
The Karate Maven archetype creates a recommended project structure with a complete pom.xml configuration, sample tests, and JUnit 5 runners, enabling you to start running Karate tests fast.
You can replace the values of com.mycompany
and myproject
as per your needs.
- macOS
- Windows
- Linux
mvn archetype:generate \
-DarchetypeGroupId=io.karatelabs \
-DarchetypeArtifactId=karate-archetype \
-DarchetypeVersion=1.5.1 \
-DgroupId=com.mycompany \
-DartifactId=myproject
mvn archetype:generate `
"-DarchetypeGroupId=io.karatelabs" `
"-DarchetypeArtifactId=karate-archetype" `
"-DarchetypeVersion=1.5.1" `
"-DgroupId=com.mycompany" `
"-DartifactId=myproject"
When running the command in Windows (PowerShell) you must use quotes around each property value to prevent parsing errors.
mvn archetype:generate \
-DarchetypeGroupId=io.karatelabs \
-DarchetypeArtifactId=karate-archetype \
-DarchetypeVersion=1.5.1 \
-DgroupId=com.mycompany \
-DartifactId=myproject
This will create a folder called
myproject
and text
file extension (following Cucumber standards) and are organized alongside your Java test classes:
The archetype generates a complete project structure with everything you need. Karate test scripts use the .feature
file extension (following Cucumber standards) and are organized alongside your Java test classes:
Key benefits of this structure:
- Feature files live next to java files (not in separate folders)
- Easy to find and manage related test files together
- No switching between different source directories
- Sample test included to get you started quickly
IDE Support
Want to skip the manual setup and dependency management? Use your favorite IDE with Karate extensions for syntax highlighting, auto-completion, and integrated test execution:
These IDE extensions provide intelligent code completion, syntax validation, and the ability to run tests directly from your editor - no command line setup required.
Next Steps
With your project created, proceed to write your first test to start building your test suite.