Skip to main content

What is KTestify?

KTestify is a modular, open-source framework for integration-testing Kafka and Kafka Streams data pipelines.

At its core sits a transport-agnostic engine that separates concerns cleanly into three layers: Transport, Orchestration, and Assertion.

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.

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 |

KTestify does not stop at Kafka clients and Gherkin steps. Its modular architecture lets you extend the framework with custom transports and matchers through plugins.

For example, the Azure Blob Storage plugin lets you interact with Azure Blob Storage to check that your Sink or Source Kafka connectors are working as expected. The HTTP plugin lets you test synchronous request and response flows.


How this documentation is organized​

The documentation follows four purpose-based sections. Pick the one that matches what you are trying to do, not who you are.

SectionWhat it is forStart here
TutorialsLearning-oriented walkthroughs that take you from zero to a running testInstallation
How-to GuidesTask recipes for writing steps, using plugins, and extending the frameworkWriting tests overview
ReferenceLookup tables: every step, config key, matcher, and pluginStep reference
ExplanationUnderstanding-oriented material on architecture and core conceptsArchitecture

Module overview​

ModuleRole
ktestify-coreTransport-agnostic library, Kafka clients, matchers, config, models
ktestify-cucumberStandalone Cucumber/Gherkin application, step definitions, hooks, services
ktestify-plugin-azureblobAzure Blob Storage plugin for validating connector output
ktestify-plugin-httpHTTP request and response transport plugin
ktestify-plugin-notificationsSuite-level notification plugin for Teams, Slack, and webhooks