What is KTestify?
KTestify is a modular, open-source framework for integration-testing Kafka/Kafka Streams data pipelines.
At its core sits a transport-agnostic engine that separates concerns cleanly into three layers, Transport, Orchestration, and Assertion.
Today, a Cucumber/Gherkin adapter (ktestify-cucumber) lets teams write plain-English test scenarios that produce messages, consume from output topics, and assert record content without touching a single line of Kafka client code. Other tests engines such as Playwright or RobotFramework are planned in the future.
Feature: Order stream validation
Background:
Given input topic
| topicName | topicAlias |
| orders-in | raw |
Given output topic
| topicName | topicAlias |
| orders-out | enriched |
Given assets directory
| absolutePath |
| src/test/resources/assets |
Scenario: Raw order should be enriched with status
When record from file is sent
| topicName | file | recordKey |
| orders-in | order-123.json | order-123 |
Then expected record from file
| topicAlias | file |
| enriched | order-enriched-output.json |
But KTestify does not stop at Kafka clients and Gherkin steps. Its modular architecture allows you to extend the framework with custom transports, matchers thanks to plugins.
For example, there is an Azure Blob Storage plugin available to lets you interact with the Azure Blob Storage to check that your Sink/Source Kafka connectors are working as expected.
Two tracks, one frameworkโ
KTestify's documentation is split into two reader tracks:
| Track | Who is it for? | Where to start |
|---|---|---|
| โ๐งช Write Tests | QA engineers & test authors who want to write Gherkin scenarios | Getting Started โ |
| ๐ง Extend the Framework | Java developers who want to add transports, matchers, or plugins | Architecture โ |
Module overviewโ
| Module | Role |
|---|---|
ktestify-core | Transport-agnostic library, Kafka clients, matchers, config, models |
ktestify-cucumber | Standalone Cucumber/Gherkin application, step definitions, hooks, services |
ktestify-plugin-azureblob | Azure Blob Storage plugin (in progress) |
Quick linksโ
- ๐ Install & run, Docker image or standalone JAR
- โ ๏ธ CI environment requirements, dedicated Kafka stack is mandatory
- ๐ Full step reference
- ๐ง Architecture deep-dive
- ๐ CHANGELOG