Skip to main content

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:

TrackWho is it for?Where to start
โ€๐Ÿงช Write TestsQA engineers & test authors who want to write Gherkin scenariosGetting Started โ†’
๐Ÿ”ง Extend the FrameworkJava developers who want to add transports, matchers, or pluginsArchitecture โ†’

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 (in progress)