|
| PLUS | PRO | Enterprise |
|---|---|---|
|
(includes all in PLUS)
|
|
By using this plugin, you agree to the Karate Labs EULA. Data on a few user actions is collected and subject to our Privacy Policy. HTML reports generated by the Karate open-source library has additional analytics.
This extension supports Karate v2 — the next generation of the Karate test automation framework. Karate v2 brings major improvements that make getting started simpler and test execution more powerful:
- Simple installation — the Karate CLI is a single binary, no Maven or Gradle project needed. Install it from within VS Code with one click via the Setup Dashboard.
- JavaScript debugging — set breakpoints and step through embedded JavaScript within
.featurefiles for the first time - ANSI colors in console — rich colored output in the terminal, works even outside the IDE
- HTML reports with tag filtering — interactive reports that let you filter results by tags
- Soft assertions — JSON validation works in soft assertion mode by default, so tests continue and report all failures instead of stopping at the first one
- Large JSON support — operations such as
containsuse disk when needed to avoid out-of-memory issues on large payloads - Setup UI — see status of Karate / CLI installation or troubleshoot
- One-click license renew — refresh your session instantly without going through the full sign-in flow again
- VS Code native test runner — view tests in dedicated test tree view, smaller gutter icons, right-click to debug
- Better Formatter — Karate syntax coloring and inline JS and Examples tables parsing re-written from scratch
- Match Syntax Diagnostics — syntax errors in Karate feature files highlighted and appears in "Problems" tab
- Install this extension from the VS Code Marketplace
- Open Command Palette > Karate: Setup to install the CLI
- Open a
.featurefile — play buttons appear in the gutter - Press Cmd+F5 (macOS) or Ctrl+F5 (Windows/Linux) to run
- Install Language Support for Java
- Set run mode to
vscode-javain settings, or leave onauto(auto-detectspom.xml/build.gradle) - Open a
.featurefile and run from the gutter or Test Explorer
If you are upgrading from the previous version of this extension (v2.x), here is what you need to know. If you are also upgrading from Karate v1 to Karate v2, see the Karate v2 Migration Guide for framework-level changes.
Looking for the v2.x extension documentation? See the previous version README.
- Run mode default: The default run mode is now
autoinstead ofvscode-java. Auto mode detects your project type — if you havepom.xmlorbuild.gradle, it uses vscode-java automatically. You can also set it explicitly in settings. - CodeLens replaced by gutter icons: The
Run/Debugtext that appeared above scenarios has been replaced by VS Code's native test gutter icons (play buttons in the left margin). These are less obtrusive and support run profiles. - Streamlined output: The dedicated "Karate" output channel has been replaced by the VS Code Test Results panel — faster, less overhead, and integrated with the Test Explorer. Karate v2 provides native ANSI color output, so you get rich colored results without any extra processing by the extension. If you relied on log coloring in v1, upgrading to Karate v2 gives you better colors natively.
- Standalone mode removed: Use
karate-climode instead. Install the Karate CLI via Karate: Setup — it is a single binary with no dependencies. - Custom mode removed: Use VS Code launch configurations for custom command setups.
Beyond the extension improvements, Karate v2 itself brings significant benefits:
- Native ANSI colors — rich colored console output works everywhere, no extension workarounds needed
- JavaScript debugging — step through embedded JS in feature files for the first time
- Soft assertions — all match failures reported instead of stopping at the first one
- Single binary CLI — no Maven or Gradle needed to get started
- See the full list of framework changes in the Karate v2 Migration Guide
All settings remain under the karatelabs.karate.* namespace. Your existing settings will continue to work:
| Old Setting | Status |
|---|---|
karatelabs.karate.run.mode |
Still supported — now also accepts auto |
karatelabs.karate.run.modeJars |
Removed (standalone mode deprecated) |
karatelabs.karate.run.classpathPrefix |
Removed (standalone mode deprecated) |
karatelabs.karate.karateCommand |
Still supported |
karatelabs.karate.cliOptions |
Still supported |
Your existing license file (~/.karate/karate.lic) is fully compatible. Offline licenses continue to work without changes. If you were previously signed in, you may need to sign in again via Karate: Sign In / Manage License.
| Mode | For | How |
|---|---|---|
| auto (default) | Any project | Detects project type automatically |
| karate-cli | v2 + karate-pom.json |
Spawns CLI directly |
| vscode-java | Maven / Gradle | Uses Red Hat Java extension |
Run tests from:
- Gutter play buttons — click the green triangle next to any Scenario
- Keyboard shortcut — Cmd+F5 / Ctrl+F5 runs the test at cursor
- Test Explorer — tree view in the sidebar with run/debug buttons
- Explorer context menu — right-click a
.featurefile to run - Example row hover — hover over an Examples data row to see
[Run >>]
VS Code launch configurations are useful for re-running tests with specific parameters. All the typical Karate options are supported, including control over JVM parameters and working directory.
Example .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "karate",
"name": "env-test",
"request": "launch",
"karateArgs": [
"-e",
"test",
"${file}"
]
}
]
}You can set up any combination of Karate runtime options via karateArgs. For example you can:
- run tests in parallel
- set the environment
- or choose tags to include or exclude
You can have multiple configurations and easily switch between them from the Run and Debug view. Add "noDebug": true to force "Run without Debugging" for convenience.
Set breakpoints in .feature files and debug with the Test Explorer debug profile. Works in both karate-cli and vscode-java modes. With Karate v2, you can also debug embedded JavaScript — step through JS expressions, inspect variables, and set breakpoints in inline scripts.
A Karate debug session will stop at Java breakpoints, allowing you to debug both Karate and Java code in the same session.
You can start a normal Java debug session that uses the Karate Runner Java API and still stop at Karate breakpoints. This requires the Language Support for Java extension and vscode-java run mode.
Rich syntax coloring for Karate/Gherkin with embedded JavaScript support.
Auto-complete Karate keywords after step prefixes (Given, When, Then, And, *).
Real-time syntax error highlighting for Gherkin structure, match expressions, and embedded JavaScript.
Format document aligns Examples table columns and normalizes indentation. Use the VS Code code-formatting keyboard shortcut to format the current file.
Feature / Scenario / Scenario Outline tree in the Outline view sidebar. Navigate large files with ease.
Collapse sections to make it easier to deal with long feature files. Multi-line regions including Scenario blocks, Background, and doc-strings can be folded.
Place the cursor within JSON embedded in a feature file to see code-action options (light-bulb icon):
- Simplify — Karate's lenient format, where single-quotes are used and no quotes are needed for property keys
- Strict — strict JSON using double-quotes
- Make single line — convert multi-line JSON to a single line
- Make multi-line — convert a single line of JSON to multi-line, including triple-quotes
License activation and status is available via a command. Go to View -> Command Palette, type Karate and choose Sign In / Manage License.
| Tier | Features |
|---|---|
| PLUS | Run tests, syntax coloring, outline, formatting |
| PRO | Debug, code completion, code folding, diagnostics, JSON re-formatting |
Click Sign In to be taken through the sign-in flow linked to your existing subscription. Once you have authenticated, copy the session ID from the browser and paste it into the input box in VS Code.
One-click renew — if your subscription is still valid, click Renew from the license info dialog to refresh your session instantly. No need to go through the full sign-in flow again.
Once signed in you can work offline. Run the Sign In / Manage License command at any time to see how many days are left in your session.
Important
The Offline License is a paid feature for enterprises. Please make sure you know who your designated admin is before you perform this step.
If you need an offline license because of strict security or similar restrictions in your environment, please contact us.
When you invoke the Sign In / Manage License command, click the Offline License button. A unique code for your system will be shown which you can copy and send to your designated admin. You will be issued a license tied to this unique code. To apply the license, paste the full license text (starting with -----BEGIN LICENSE FILE-----) into the text field.
| Setting | Default | Description |
|---|---|---|
karatelabs.karate.run.mode |
auto |
How to run tests: auto, karate-cli, or vscode-java |
karatelabs.karate.run.console |
integratedTerminal |
Where to show test output |
karatelabs.karate.karateCommand |
karate |
Path to the Karate CLI executable |
karatelabs.karate.cliOptions |
[] |
Additional CLI options passed to the Karate CLI |
Tip: VS Code supports workspace settings in
.vscode/settings.jsonthat can be shared via version control to ensure your whole team uses the same configuration.
| Command | Description |
|---|---|
| Karate: Setup | Open the Setup Dashboard |
| Karate: Sign In / Manage License | Sign in or manage your license |
| Karate: Kill All Running Tests | Stop all running Karate processes |
| Karate: Clean Reports | Clean karate report files |
| Karate: New Feature File | Create a new .feature file from a template |
| Shortcut | Action |
|---|---|
| Cmd+F5 / Ctrl+F5 | Run test at cursor |
- CLI not found: Run Karate: Setup to install the CLI, or set
karatelabs.karate.karateCommandto the full path - vscode-java not working: Ensure the Language Support for Java extension is installed and the project has imported successfully (look for the "Java Ready" indicator in the status bar)
- Debug not starting: Check the Karate Debug output channel for errors
- Check logs: Open the Output panel and select "Karate" for extension logs. Use the VS Code command
Developer: Set Log Levelto change the log level toDebugfor more detail. - Feature file not recognized: If another extension is handling
*.featurefiles, make sure the Karate Labs extension is set as the default. Check that the language mode in the status bar shows "Karate" and not "Cucumber" or similar.










