MCPcopy Index your code
hub / github.com/karatelabs/karate

github.com/karatelabs/karate @v2.1.0

repository ↗ · DeepWiki ↗ · release v2.1.0 ↗ · Ask this repo → · + Follow
10,657 symbols 57,759 edges 659 files 2,118 documented · 20% updated 1d agov2.1.0 · 2026-06-17★ 8,89415 open issues
README

Karate v2

[!NOTE] 📣 Read the official announcement on LinkedIn

Karate v2 is a complete rewrite of Karate, the popular open-source test automation framework. It combines API testing, mocking, and performance testing into a single, unified tool.

Karate v1 supports web-browser automation, and this will be eventually added to v2 as well.

Modules

Module Description
karate-js Lightweight JavaScript engine for the JVM with thread-safe concurrent execution
karate-core Core testing framework with HTTP client/server, templating, and match assertions

Key Features

  • API Test Automation - Write expressive tests in Gherkin syntax with powerful JSON and XML assertions
  • Mock Servers - Built-in HTTP server for API mocking with dynamic responses
  • Performance Testing - Scale from functional tests to load tests seamlessly
  • HTML Templating - Thymeleaf-based templating with HTMX and AlpineJS support
  • Thread-Safe JavaScript - Custom JS engine designed for parallel test execution
  • Java 21+ - Built on modern Java with virtual threads and latest language features

Getting Started

Requirements

  • Java 21 or higher

Maven Dependency

Coming soon.

Documentation

For Karate 1.x Users

Karate v2 maintains backwards compatibility with 1.x features. If you're migrating from 1.x, most of your existing tests should work with minimal changes.

See MIGRATION_GUIDE.md for details on migrating from v1.

Related Projects

License

MIT License

About

Karate v2 is developed by Karate Labs Inc. with contributions from the community.

We invite enterprise users of Karate to review, influence the direction, and contribute to this project.

Extension points exported contracts — how you extend this code

HttpClientFactory (Interface)
Factory for creating HttpClient instances. This interface allows external modules (such as karate-gatling) to provid [14 …
karate-core/src/main/java/io/karatelabs/http/HttpClientFactory.java
JsLazy (Interface)
Marker for a lazily-resolved binding value. When stored as a binding's value, the engine invokes #get() on each [33 implementers]
karate-js/src/main/java/io/karatelabs/js/JsLazy.java
TestEvent (Interface)
Sealed hierarchy of test events for streaming dynamic test generation. Uses Java 17+ sealed interfaces and records f [4 …
karate-junit6/src/main/java/io/karatelabs/junit6/TestEvent.java
GatlingStatsReporter (Interface)
Java interface to Gatling's StatsEngine for reporting performance metrics. This allows pure Java code to report metrics
karate-gatling/src/main/java/io/karatelabs/gatling/GatlingStatsReporter.java
ExtGlobalFactory (Interface)
Mints a per-scenario ext-global instance, bound fresh into each scenario's JS scope. The alternative {@link Sui [12 implementers]
karate-core/src/main/java/io/karatelabs/core/ExtGlobalFactory.java
JsIterator (Interface)
Spec-style values iterator returned by IterUtils#getIterator. Used by for-of, spread, destructuring, and Array.f [20 implementers]
karate-js/src/main/java/io/karatelabs/js/JsIterator.java
ChannelFactory (Interface)
Factory for creating Channel instances. Implementations are loaded via Class.forName() using hardcoded c [12 implementers]
karate-core/src/main/java/io/karatelabs/core/ChannelFactory.java
Fn3 (Interface)
(no doc) [14 implementers]
karate-js/src/main/java/io/karatelabs/js/Args.java

Core symbols most depended-on inside this repo

eval
called by 2154
karate-core/src/main/java/io/karatelabs/driver/Driver.java
get
called by 1494
karate-core/src/main/java/io/karatelabs/http/SessionStore.java
contains
called by 1287
karate-core/src/main/java/io/karatelabs/match/Value.java
get
called by 1076
karate-js/src/main/java/io/karatelabs/js/JsLazy.java
put
called by 972
karate-core/src/main/java/io/karatelabs/http/Http.java
append
called by 945
karate-core/src/main/java/io/karatelabs/core/KarateJsUtils.java
toString
called by 845
karate-js/src/main/java/io/karatelabs/js/SimpleObject.java
resolve
called by 841
karate-core/src/main/java/io/karatelabs/markup/ResourceResolver.java

Shape

Method 9,539
Class 639
Function 386
Interface 62
Enum 31

Languages

Java96%
TypeScript4%
Python1%

Modules by API surface

karate-core/src/main/resources/io/karatelabs/output/res/alpine.min.js248 symbols
karate-core/src/main/java/io/karatelabs/driver/cdp/CdpDriver.java126 symbols
karate-js/src/test/java/io/karatelabs/js/SpecPinTest.java109 symbols
karate-core/src/test/java/io/karatelabs/core/StepJsTest.java109 symbols
karate-js/src/test/java/io/karatelabs/js/EvalTest.java105 symbols
karate-js/src/test/java/io/karatelabs/common/ResourceTest.java102 symbols
karate-core/src/test/java/io/karatelabs/markup/MarkupTest.java101 symbols
karate-core/src/main/java/io/karatelabs/core/ScenarioRuntime.java101 symbols
karate-core/src/main/java/io/karatelabs/core/StepExecutor.java100 symbols
karate-js/src/test/java/io/karatelabs/js/ExternalBridgeTest.java99 symbols
karate-core/src/test/java/io/karatelabs/driver/LocatorsTest.java98 symbols
karate-core/src/main/java/io/karatelabs/core/Runner.java90 symbols

Dependencies from manifests, versioned

ch.qos.logback:logback-classic
ch.qos.logback:logback-core
com.jayway.jsonpath:json-path3.0.0 · 1×
de.siegmar:fastcsv4.3.0 · 1×
io.gatling.highcharts:gatling-charts-highcharts
io.gatling:gatling-core-java
io.github.t12y:resemble1.1.0 · 1×
io.github.t12y:ssim1.0.0 · 1×
io.karatelabs:karate-core
io.karatelabs:karate-js
io.netty:netty-bom

For agents

$ claude mcp add karate \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact