Karate is a single open-source DSL for REST, GraphQL, SOAP, browser, desktop, performance, and mock-server tests. Plain Gherkin syntax, runs on the JVM, parallel by default, MIT-licensed.
Feature: User API Tests
Scenario: Create and verify a new user
Given url 'https://api.example.com/users'
And request { name: 'John', email: 'john@test.com' }
When method post
Then status 201
And match response.name == 'John'
And match response.id == '#notnull'
Feature: Browser Login Flow
Scenario: User signs in to the dashboard
Given driver 'https://app.example.com/login'
And input('#email', 'jane@test.com')
And input('#password', 's3cret!')
When click('{^}Sign In')
Then match driver.url contains '/dashboard'
And match text('.welcome') == 'Welcome, Jane'
// Reuse the same .feature as a Gatling load test
class UserPerfTest extends Simulation {
val users = karateFeature("classpath:users.feature")
setUp(
scenario("create users").exec(users)
.inject(rampUsers(100).during(10))
).assertions(global.responseTime.max.lt(2000))
}
Feature: User Service Mock
Background:
* def users = []
Scenario: pathMatches('/users') && methodIs('post')
* def user = { id: '#(~~users.length)', name: request.name }
* users.push(user)
* def response = user
* def responseStatus = 201
One framework. Every kind of test.
No three stacks to maintain. Write a feature file once — run it as an API test, drive it through a browser, replay it as a Gatling load test, or stand it up as a service mock.
Scenario: Create user
Given url apiUrl + '/users'
And request { name: 'Jane' }
When method post
Then status 201
And match response.id == '#notnull'
Scenario: Sign in flow
Given driver 'https://app.example.com'
And input('#email', 'jane@test.com')
And input('#password', 'secret')
When click('{^}Sign In')
Then match driver.url contains '/dash'
// Reuse the same .feature file
class UserPerf extends Simulation {
val users = karateFeature(
"classpath:users.feature")
setUp(scenario("u").exec(users)
.inject(rampUsers(100).during(10)))
}
Scenario: pathMatches('/users/{id}')
&& methodIs('get')
* def id = pathParams.id
* def response =
{ id: '#(id)', name: 'Jane' }
* def responseStatus = 200
API Testing
Schema-style assertions, JSON path, end-user flows, and reuse-as-perf — all built in.
Low-code schema matching
Chain API calls and user actions
Loop with ease, even use CSV files
~10× faster than single-threaded
DB calls, async, gRPC, Kafka and more
No re-writing tests in a 2nd tool
Product Owners can contribute tests
API Performance Testing
Same feature files, thousands of concurrent requests, rich HTML reports — drop into the project you already have.
Re-use functional tests as-is
Detailed HTML powered by Gatling
Continuous performance testing
Maven or Gradle, your choice
Any Java integration is perf-testable
Confidence that responses are accurate
Add to an existing API testing project
API Mocks
100% local, thread-safe, plain-text in Git. No proprietary mock format to learn.
100% local, no data in the cloud
Stateful, simulate complex behavior
Plain-text — share and collaborate
Thread-safe, supports perf tests
Embed in unit-tests or command-line
Started in minutes, minimal setup
No programming experience needed
Web Browser Automation
W3C WebDriver and Chrome DevTools, parallel via Docker, visual checks built in — mix UI and API steps in one test.
W3C WebDriver, Chrome DevTools
Switch browsers via config alone
Wait for elements, powerful API
Docker or cloud-based grids
Self-hosted, local, low-latency
Tags, config, and env switching
Mix API and UI in one test
Plays well with your stack
Maven or Gradle for the build, JUnit 5 for the runner, Docker for the runtime, your CI of choice for the trigger. No proprietary toolchain.
Install in 30 seconds
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>1.5.1</version>
<scope>test</scope>
</dependency>
dependencies {
testImplementation(
'com.intuit.karate:karate-junit5:1.5.1'
)
}
test {
useJUnitPlatform()
}
# Download & run from anywhere
curl -O https://github.com/
karatelabs/karate/releases/
download/v1.5.1/
karate-1.5.1.jar
java -jar karate-1.5.1.jar
users.feature
Need more? Read the full quick-start guide →
Karate is fully open source under the MIT license. The main repo on GitHub is the source of truth — star it, file issues, send PRs.
8,834+
GitHub Stars
350+
Contributors
2M+
Downloads / month
The quickstart takes about ten minutes. The docs cover every feature on this page in depth, with runnable examples.