Open Source · MIT

One framework for
API & UI testing.

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.

MIT License 8,834+ stars 350+ contributors 2M+ downloads/mo Java 17+
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
PASSED in 47ms

One framework. Every kind of test.

Same Gherkin syntax. APIs, browsers, load tests, mocks.

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.

API Testing

Functional tests for REST, GraphQL, and SOAP — in plain Gherkin.

Schema-style assertions, JSON path, end-user flows, and reuse-as-perf — all built in.

API Assertions

Low-code schema matching

End-user workflows

Chain API calls and user actions

Data-Driven Testing

Loop with ease, even use CSV files

Parallel Execution

~10× faster than single-threaded

Java Interop

DB calls, async, gRPC, Kafka and more

Re-use as Perf Tests

No re-writing tests in a 2nd tool

Easy for non-programmers

Product Owners can contribute tests

API Performance Testing

Re-use your functional tests as Gatling load tests.

Same feature files, thousands of concurrent requests, rich HTML reports — drop into the project you already have.

Re-use API Tests

Re-use functional tests as-is

Rich Reports

Detailed HTML powered by Gatling

CI / CD Friendly

Continuous performance testing

Runtime Options

Maven or Gradle, your choice

Java Interop

Any Java integration is perf-testable

Payload Assertions

Confidence that responses are accurate

Simple Setup

Add to an existing API testing project

API Mocks

Stand up stateful service mocks — in the same syntax.

100% local, thread-safe, plain-text in Git. No proprietary mock format to learn.

Self Hosted

100% local, no data in the cloud

Dynamic Responses

Stateful, simulate complex behavior

Git Friendly

Plain-text — share and collaborate

Parallel Requests

Thread-safe, supports perf tests

Life-cycle API

Embed in unit-tests or command-line

Easy Install

Started in minutes, minimal setup

Simple Syntax

No programming experience needed

Web Browser Automation

Drive real browsers from the same feature files.

W3C WebDriver and Chrome DevTools, parallel via Docker, visual checks built in — mix UI and API steps in one test.

Standards Support

W3C WebDriver, Chrome DevTools

Cross Browser

Switch browsers via config alone

Stable Tests

Wait for elements, powerful API

Parallel Execution

Docker or cloud-based grids

Visual Testing

Self-hosted, local, low-latency

Assertions & Reports

Tags, config, and env switching

Hybrid Testing

Mix API and UI in one test

Plays well with your stack

Drop Karate into the build you already have.

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.

MavenMaven
GradleGradle
JUnit 5JUnit 5
DockerDocker
GitHub ActionsGitHub Actions
JenkinsJenkins
IntelliJIntelliJ
VS CodeVS Code
GraphQLGraphQL
PlaywrightPlaywright
CucumberCucumber
SpringSpring

See all integrations

Install in 30 seconds

Three ways to add Karate to your project.

Maven pom.xml
<dependency>
  <groupId>com.intuit.karate</groupId>
  <artifactId>karate-junit5</artifactId>
  <version>1.5.1</version>
  <scope>test</scope>
</dependency>
Gradle build.gradle
dependencies {
  testImplementation(
    'com.intuit.karate:karate-junit5:1.5.1'
  )
}

test {
  useJUnitPlatform()
}
Standalone JAR no project
# 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 →

Built in the open since 2017.

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

Get going.

The quickstart takes about ten minutes. The docs cover every feature on this page in depth, with runnable examples.