Skip to main content

EXTENSIONS

Examples and Demos

Karate provides extensive example projects and integrations to accelerate your testing. This page indexes all official examples, demo repositories, and integration patterns.

On this page:

Java Version Compatibility
  • Karate 1.4.1 requires Java 21 or lower
  • Karate 1.5.1 requires Java 23 or lower
  • Karate 1.5.2+ supports Java 24 and above

Starter Projects

karate-template

The fastest way to start a new Karate project. Use this GitHub template to create a skeleton project for API testing.

Repositorykaratelabs/karate-template
Use caseNew API testing projects
IncludesMaven setup, example tests, parallel runner

karate-todo

A complete demo application showcasing all Karate capabilities. Includes a working front-end UI and back-end API with examples of every testing type.

Repositorykaratelabs/karate-todo
Use caseTraining, demos, learning all Karate features
IncludesAPI tests, performance tests, mocks, UI tests, hybrid tests
Best for Learning

The karate-todo project is ideal for training sessions or demonstrating Karate's full capabilities to your team.

API Testing

Example Projects

ProjectDescription
karate-demoComprehensive regression test-suite for Karate itself with extensive examples
karate-todoWorking API with complete test examples
spring-bootSpring Boot application testing patterns
folio-integration-testsComplex real-world open-source implementation

Feature Examples

The karate-demo project contains working examples for common testing scenarios:

FeatureExampleDescription
OAuth 2.0oauth2.featureAuthentication flow with token handling
GraphQLgraphql.featureQueries with variables and nested responses
SOAPsoap.featureXML SOAP web service testing
File Uploadupload.featureMultipart file uploads
Multiple Filesupload-multiple-files.featureUploading multiple files
Dynamic Paramsdynamic-params.featureData-driven parameter testing
Schema Validationschema.featureJSON schema-like validation
Headersheaders.featureRequest header management
Pollingpolling.featureRetry and polling patterns
Hookshooks.featureBefore/after scenario hooks
WebSocketwebsocket.featureWebSocket message handling
Calling Featurescall-feature.featureReusable feature files
Dynamic CSVdynamic-csv.featureCSV-driven scenario outlines
Java Interopcats-java.featureCalling Java from Karate
Databasedogs.featureJDBC database calls
Redirectsredirect.featureHTTP redirect handling
Encodingencoding.featureCharacter encoding

Performance Testing

Karate integrates with Gatling to re-use API functional tests as performance tests.

ProjectDescription
examples/gatlingStandalone Gatling + Karate project
karate-todoIncludes working performance test example
karate-gatling docsMain documentation with examples

See the Performance Testing documentation for detailed setup and configuration.

API Mocking

Create API mocks and test doubles that can maintain state across calls.

ProjectDescription
examples/gatlingIncludes mock server example alongside performance tests
karate-todoMock server examples including pure JS option
consumer-driven-contractsContract testing with payment mock example
karate-nettyMock server documentation and examples

See the Test Doubles documentation for mock server setup.

Web Browser Automation

ProjectDescription
karate-e2e-testsMulti-browser configuration, parallel testing with karate-chrome Docker
karate-todoUI tests and hybrid API+UI tests
Visual TestingBuilt-in image comparison for visual regression

Cloud Platform Support

Karate UI tests run on any WebDriver/Selenium-compatible infrastructure:

PlatformExample
Sauce LabsConfiguration and setup
BrowserStackConfiguration and setup
LambdatestConfiguration and setup

See the UI Testing documentation for browser automation details.

Desktop Automation

Automate native Windows, Mac, and Linux applications using Karate Robot.

ResourceDescription
Windows Install GuideSetup and getting started
examples/robot-testStandalone Maven project

See the Desktop Automation documentation for complete reference.

Integrations

The karate-examples repository contains integration examples for 30+ tools and frameworks.

Cloud and Infrastructure

IntegrationDescriptionLink
AWSAWS SDK integration via Java interopaws
AWS DynamoDBDynamoDB-specific examplesaws-dynamodb
DockerCI/CD pipeline integrationdocker
GitHub CodespacesBrowser-based developmentDocumentation

Messaging and Async

IntegrationDescriptionLink
KafkaSeamless Kafka message testingkafka
Kafka mTLSKafka with mutual TLSkafka-mtls
Kafka CustomAdvanced Kafka patternskafka-custom
RabbitMQMessage queue testingrabbitmq
ActiveMQJMS queue integrationDemo example
WebSocketBuilt-in + advanced Java interopwebsocket

Application Frameworks

IntegrationDescriptionLink
Spring BootTesting Spring Boot applicationsspring-boot
MicronautMicronaut framework integrationmicronaut
QuarkusQuarkus integration testingquarkus

Build Tools and Runtime

IntegrationDescriptionLink
MavenPrimary build tool (most examples use Maven)karate-template
GradleFull Gradle supportDocumentation
JBangRun Karate without Java installjbang
JBang + NPMJBang with NPM integrationjbang-npm
NPMNode.js package optionDocumentation
JUnitJava test framework integrationDocumentation

Reporting

IntegrationDescriptionLink
AllureOfficial Allure Report supportDocumentation
ReportPortalOfficial integration agentAgent
XrayOfficial Xray documentationDocumentation
JacocoCode coverage for Java backendsDemo
Cucumber ReportsCompatible HTML reportsDemo

Protocols

IntegrationDescriptionLink
gRPCSeamless gRPC service testinggrpc
gRPC CustomAdvanced gRPC patternsgrpc-custom
SSL/mTLSX509 certificate configurationssl
SSHServer command invocationssh

Testing Tools

IntegrationDescriptionLink
Accessibility/AxeDOM accessibility checks in UI testsaxe
CLI/BashCommand-line and shell script testingcli
DatabaseSQL and JDBC integrationdatabase

Enterprise Integrations

IntegrationDescriptionLink
Broadcom/CAContinuous Delivery Director pluginDocumentation
SlackCommunity examples and blog postsslack

Community Resources

Videos

VideoDescription
API Testing with KarateOfficial introduction by Peter Thomas
Karate Tutorial SeriesComprehensive guide by James Willett

Books

BookAuthor
Writing API Tests with KarateBenjamin Bischoff (Packt Publishing)

Community

ResourceDescription
Stack OverflowActive Q&A community
GitHub DiscussionsFeature requests and questions

Comparison

For teams evaluating Karate against other tools, see this detailed comparison with REST-assured.

Next Steps