Skip to main content

ENTERPRISE

IntelliJ IDEA

The Karate Labs IntelliJ plugin provides a complete development environment for Karate tests — syntax highlighting, run-from-editor, and debugging. Works fully-featured on IntelliJ IDEA, any edition.

Watch on YouTube: Karate for IntelliJ: write it, run it, debug it | Debug Karate tests from JUnit (3:01)

New to Karate in IntelliJ? Follow the IntelliJ Quick Start.

Plugin Features by License​

IDE Plus

core features

  • ✓Syntax coloring
  • ✓Run Feature from editor
  • ✓Run single Scenario / Example
  • ✓Run Configurations
  • ✓Structure view
  • ✓Code formatting
  • ✓In-IDE test results
  • ✓Run all tests in folder

IDE Pro

includes all in IDE Plus

  • ✓Auto complete
  • ✓Code folding
  • ✓Jump to references
  • ✓JSON re-formatting
  • ✓Run Karate Labs add-ons (e.g. Kafka)
  • ✓Debug Karate test
  • ✓Debug Java & Karate in same session
  • ✓Java debug session stops at Karate breakpoints

Enterprise

includes all in IDE Pro

  • ✓Async API testing (Kafka, gRPC, WebSocket, Webhook) with a runtime license for CI/CD
  • ✓Floating (concurrent) licenses
  • ✓License management portal
  • ✓Priority support & SLA
  • ✓SSO / SAML support
  • ✓Offline license
  • ✓Contact us
Any edition of IntelliJ IDEA

The plugin works fully-featured on any edition of IntelliJ IDEA. Its JavaScript support is built in and needs no paid JetBrains subscription.

Legal Notice

By using this plugin, you agree to the Karate Labs EULA. The plugin and the Karate open-source library both ship with zero telemetry — no usage data, analytics, or device information is collected or transmitted. See our Privacy Policy for details.

Installation​

  1. Open a .feature file. IntelliJ offers Plugin supporting *.feature files found · Install Karate plugin: click it. Or open Settings → Plugins → Marketplace and search karate.
  2. Several plugins have similar names. Install Karate whose vendor is Karate Labs Inc. (plugin 19232). No restart needed.
  3. Sign in in Settings → Languages & Frameworks → Karate.

Requirements

  • IntelliJ IDEA 2026.1 or later for plugin 4.x (the 3.x plugin supports 2024.3 through 2025.3)
  • Java 21+ (for Karate v2), Java 17+ (for Karate 1.5.x) or Java 11+ (for Karate 1.4.x)
  • No additional plugins required — JavaScript support is built-in

License Activation​

License activation and status is unified within the IntelliJ settings UI. Go to Settings → Languages & Frameworks → Karate.

License activation settings panel in IntelliJ
  1. Click the Sign In link — your browser opens Karate Sensei, tied to your subscription. Sign in with Google, GitHub, Microsoft or your enterprise SSO.
  2. Copy the session ID from the browser and paste it into the input box in the IntelliJ settings view.
  3. Click Apply to complete sign-in. Settings shows Signed in as … with your products.

Once authenticated you can work offline. The settings page shows how many days remain in your session.

If you need an offline license because of strict security or similar restrictions, please contact us. Offline licensing is available only for enterprise customers.

Session Renewal​

Once signed-in, you can renew or extend the session in one click without re-authenticating in a browser.

Session renewal button in IntelliJ settings

If you have a valid subscription, Renew Session works even if your session has expired.

A notification appears when 10 or fewer days remain in your session. Clicking Renew Now takes you directly to the Karate settings screen for a one-click renewal.

Session renewal notification banner

Offline License​

Enterprise only

Offline licensing is a paid feature for enterprises. Make sure you know who your designated admin is before performing this step.

On the License Activation settings page, click the Enter Offline License link.

Offline license button in IntelliJ settings

A unique code for your system will be shown (for example, DhHOFKHvd7XYTi+rQnNTJQ==). Send that code to your designated admin. You will be issued a license tied to this unique code.

To apply the license, copy the entire license file (starting with -----BEGIN LICENSE FILE-----) and paste it into the text area provided.

Pasting an offline license file in IntelliJ

Click Apply — you should see a confirmation message and your license details.

Core Features​

Run From Editor​

Right-click a .feature file in the project explorer or editor and run it. An IntelliJ run configuration is created automatically — you can customize it later if needed.

You can also run a whole Feature or a single Scenario from ▶ in the gutter, or put the caret in a scenario and press ⌃⇧R (Ctrl+Shift+F10 on Windows / Linux). Clicking the gutter icon also offers Debug.

Run or debug a single scenario from the gutter icon

You can even run a single example in a Scenario Outline by right-clicking a data row within an Examples table.

Run a single example from an Examples data row

Run Configurations​

IntelliJ run configurations let you re-run tests with specific parameters. All typical Karate options are supported, including environment selection, tag filtering, parallel execution, JVM parameters, and working directory.

Karate run configuration dialog in IntelliJ

Structure View​

The IntelliJ structure view lets you navigate large feature files — jump directly to scenarios and examples.

IntelliJ structure view for a Karate feature file

Code Formatting​

IntelliJ code formatting shortcuts work as expected — even JSON within doc-string blocks is formatted correctly.

Karate feature file before and after reformatting

Test Results​

Test results integrate into the IntelliJ test-results view; a failed scenario shows its reason, such as match failed. The Run console prints a link to the HTML report, target/karate-reports/karate-summary.html. Keep a feature's page open in the browser and reload it after each run to watch red turn green.

Karate test results in the IntelliJ test runner panel

When tests fail, you can navigate directly to the feature file and line that failed by clicking the hyperlinks in the log.

Clickable error hyperlink in the Karate test log

Run Folder​

Right-click any folder in the project explorer to run all feature files within it.

Right-click context menu to run all tests in a folder

Advanced Features (IDE Pro)​

Auto Complete​

Beyond syntax validation, you get auto-complete for the most commonly used keywords.

Keyword auto-complete suggestions in a Karate feature file

Code Folding​

Collapse sections to make it easier to work with long tests.

Code folding in a Karate feature file

References​

Click to navigate to called files. Hover to see context. Currently supported for the read() and Java.type() syntax — more coming soon, including auto-complete for references. With the caret on the class name in Java.type('…'), ⌘B (Ctrl+B) opens the Java source.

Jump to Java class reference from a Karate test

JSON Re-formatting​

Place the cursor inside JSON to see a "bulb" icon with re-format options.

JSON re-format bulb icon in the Karate editor

The options depend on context:

  • Lenient — JS-style, single quotes and unquoted property keys
  • Strict — Standard JSON with double quotes
  • Make single line — Convert multi-line JSON to a single line
  • Make multi-line — Convert single-line JSON to multi-line, including triple-quotes

Debug​

Set breakpoints in feature files, in JavaScript inside * def docstrings (Karate 2.1.4+), and in .js files the feature reads. When paused, the Variables view shows Karate variables, and inside JavaScript the function's arguments and locals.

Evaluate (⌥F8 / Alt+F8) takes a full Karate step when paused at a step, so you can work against a live session, REPL-style: for example highlightAll('input') outlines every input in the browser a UI test drives. Paused inside JavaScript, it takes a JavaScript expression.

Step Back and Hot Reload are in the Debug tool window's ⋮ (More) menu, and in Find Action:

  • Step Back moves the session back one step and pauses there; step forward to run it again. Edit a .js file, save, Step Back to the step that read()s it, and step forward: the step re-reads your change.
  • Hot Reload (enabled while paused) saves the editor and replaces the feature's changed steps. Then Step Back and step forward to run them again, in the same session, with no restart.

A JUnit debug session reads features and .js files from target/test-classes, so it does not see an edit until a rebuild; to edit and replay, debug the scenario from the feature's gutter. The IntelliJ Quick Start walks through a fix with Step Back.

Debugging a Karate feature file with the variables panel

Debug Java from Karate​

A Karate debug session will stop at Java breakpoints, including in Java code a feature calls through Java.type().

Debug Karate from Java​

You can also start a normal Java debug session that uses the Karate Runner Java API and have it stop at Karate breakpoints. This requires Karate 1.5.0 or greater.

  • Use the Karate Runner Java API as in this example
  • Use an IntelliJ Java or JUnit run configuration in Debug mode. Right-clicking a JUnit class (or method) or a Java class with a main method is normally how you create one.

Because the Runner API is pure Java, it does not get in the way of your flow or infrastructure. For example, your JUnit test can start your app, as a Spring Boot test would, and then start your Karate test suite. Debug the JUnit test as usual: the one session stops at Java breakpoints, even in code called from Karate, and at Karate breakpoints in features and JavaScript. A debugged parallel run uses a single thread.

Debug Gradle Projects​

For Gradle projects, the run configuration IntelliJ creates may default to a Gradle-specific one rather than the native Java run configuration that honors breakpoints in Karate feature files. Change it via Settings → Build, Execution, Deployment → Build Tools → Gradle → Build and run — set Run tests using to Choose per test.

Gradle build and run settings in IntelliJ

Now when right-clicking on a JUnit test or Java class, you can choose the Java run configuration instead of the Gradle one.

Right-click menu showing the option to choose the Java run configuration

Configuration​

Workspace Settings​

Use .idea/workspace.xml entries for team-wide plugin settings.

File Type Association​

Ensure .feature files are associated with the Karate plugin in Settings → Editor → File Types.

Troubleshooting​

If you don't see options to run a test, make sure the Karate icon appears for open .feature files in the editor and the project explorer. The Cucumber for Java plugin can conflict with Karate — disable it.

Karate file icon in the project explorer

To verify the Karate plugin handles .feature files, go to Settings → Editor → File Types → Recognized File Types.

Recognized file types settings in IntelliJ

If you really need to mix Cucumber tests and Karate tests in the same workspace, see this Stack Overflow answer.

Resources​

Next Steps​