# Karate testing

> Karate testing is an open-source agent skill for developer tools. Writes JVM HTTP API tests as Karate .feature files, run through JUnit 5 and Maven. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/testland/qa/tree/main/plugins/qa-api-testing/skills/karate-testing
- **Repository:** https://github.com/testland/qa
- **GitHub stars:** 18
- **License:** MIT
- **Skill name:** karate-testing
- **Collection:** https://github.com/testland/qa
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through building HTTP API test suites in Karate, where tests are plain Gherkin-style feature files rather than Java code. It explains the step keywords for setting URLs, paths, headers, parameters and request bodies, and shows how the match keyword checks JSON or XML with fuzzy type validators and optional fields.

The guidance covers shared setup with a Background block, passing secrets in through system properties, chaining responses into later steps with variables, and wiring a JUnit 5 runner class that loads feature files with Maven. It also includes a GitHub Actions workflow that runs the suite and publishes the JUnit XML summary to CI.

The skill expects a Maven project on the JVM with Karate's junit5 dependency and a Java runner class to host the features. It excludes Karate's mock-server and UI-automation modes and points to other skills for Java fluent tests or non-JVM stacks.

## When your agent uses it

> Use when a JVM project wants HTTP API tests written as Karate .feature files instead of Java code: the Gherkin-style DSL, match with fuzzy validators, JUnit 5 and Maven runs, and JUnit XML for CI. For Java fluent tests use restassured-testing; for Python YAML tests use tavern-testing.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/testland/qa/tree/HEAD/plugins/qa-api-testing/skills/karate-testing)
- [License: MIT](https://github.com/testland/qa/tree/HEAD/plugins/qa-api-testing/skills/karate-testing)

## Features

- **Gherkin feature authoring:** Covers writing Karate .feature files with Given, When and Then steps that run without step-definition glue code.
- **Fuzzy JSON matching:** Explains the match keyword and its type validators for numbers, strings, optional fields and array contents.
- **JUnit 5 and Maven runs:** Shows the runner class pattern and the mvn test command used to execute feature files.
- **Shared setup and secrets:** Describes Background blocks for common auth and reading tokens from system properties.
- **Variable chaining:** Shows how to capture a value from one response and reuse it in a later request.
- **CI reporting:** Provides a GitHub Actions workflow that uploads Karate reports and surfaces JUnit XML results.

## Good for

- Write API tests for a Spring service using Karate feature files
- Validate JSON response shapes with fuzzy type matching
- Chain a POST and a follow-up GET in one scenario
- Set up a Maven project to run Karate tests with JUnit 5
- Add a GitHub Actions job that runs Karate and reports results

## Install

### Claude Code

This skill ships in the `qa-api-testing` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add testland/qa
/plugin install qa-api-testing@testland-qa
```

Or copy only this skill to `~/.claude/skills/karate-testing`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/karate-testing &&
cp -R "$tmp/plugins/qa-api-testing/skills/karate-testing" ~/.claude/skills/karate-testing &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/karate-testing` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/karate-testing` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/karate-testing &&
cp -R "$tmp/plugins/qa-api-testing/skills/karate-testing" ~/.agents/skills/karate-testing &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/karate-testing` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/karate-testing` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/karate-testing &&
cp -R "$tmp/plugins/qa-api-testing/skills/karate-testing" ~/.cursor/skills/karate-testing &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/karate-testing` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/testland/qa.git --path plugins/qa-api-testing/skills/karate-testing
```

Or copy the folder to `~/.gemini/skills/karate-testing` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/karate-testing`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/karate-testing &&
cp -R "$tmp/plugins/qa-api-testing/skills/karate-testing" ~/.copilot/skills/karate-testing &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/karate-testing` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/testland/qa.git
```

Then copy `qa/plugins/qa-api-testing/skills/karate-testing` into your agent's skills folder as `karate-testing`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Karate testing require Java code for the tests?

No. The tests are written as .feature files, although a small JUnit 5 runner class is still needed to launch them under Maven.

### Which build tool and language does Karate testing assume?

It assumes a JVM project built with Maven, using the io.karatelabs karate-junit5 dependency and Java 21 in the CI example.

### How are API tokens handled?

The skill reads them from system properties passed to mvn test with -D, rather than hard-coding them in feature files.

### Does Karate testing cover Karate's mock or UI modes?

No. The skill states that mock-server and UI-automation modes are out of scope.

### How do I install Karate testing in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/karate-testing to use it in all your projects, or to .claude/skills/karate-testing in one project. Or install the qa-api-testing plugin, which includes it: /plugin marketplace add testland/qa, then /plugin install qa-api-testing@testland-qa.

### Does Karate testing run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Karate testing?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Karate testing?

The closest alternatives to Karate testing are Junit 5 skill, Cucumber skill, Java junit, Restassured testing and Test.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Junit 5 skill](https://ai-powered.com/skills/junit-5-skill): Junit 5 skill is an open-source agent skill for developer tools.
- [Cucumber skill](https://ai-powered.com/skills/cucumber-skill): Cucumber skill is an open-source agent skill for developer tools.
- [Java junit](https://ai-powered.com/skills/java-junit): Java junit is an open-source agent skill for developer tools.
- [Restassured testing](https://ai-powered.com/skills/restassured-testing): Restassured testing is an open-source agent skill for developer tools.
- [Test](https://ai-powered.com/skills/test-snk-devcenter): Test is an open-source agent skill for developer tools.
- [Behave skill](https://ai-powered.com/skills/behave-skill): Behave skill is an open-source agent skill for developer tools.
- [Jest skill](https://ai-powered.com/skills/jest-skill): Jest skill is an open-source agent skill for developer tools.
- [Spring boot testing](https://ai-powered.com/skills/spring-boot-testing): Spring boot testing is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/karate-testing
