What is KTestify?
KTestify is a modular, open-source framework for testing Apache Kafka data pipelines. At its core sits a transport-agnostic engine — today powering a Cucumber/Gherkin adapter that lets teams produce messages, consume from output topics, and assert record content in plain English. Tomorrow, the same core will drive other test engines and integrations, all without touching a single line of Kafka client code.
Modules
A pure Java library with producer and consumer abstractions, pluggable record matchers (JSON, XML, XPath, Avro), dynamic variable injection, and a HOCON-based configuration system.
A standalone Cucumber adapter with DataTable-driven step definitions for topics, namespaces, schemas, and scripts. Write integration tests in plain English — no Kafka client code required.
Extend your test scenarios with Azure Blob Storage steps. Upload files, validate blob contents, and chain blob checks with Kafka assertions — all from the same feature file.
How it works
Write scenarios in plain English. KTestify handles topic wiring, message production, offset management, and record matching — so your tests stay readable.
Feature: Order stream validation
Background:
Given output topic
| topicName | topicAlias | namespace |
| orders-out | enriched | com.example |
Given assets directory
| path |
| src/test/resources/assets |
Scenario: Enriched order appears on the output topic
When record from file is sent
| topicName | messageFile |
| orders-in | order-123.json |
Then expected record from file
| topicAlias | expectedFile |
| enriched | order-enriched-output.json |
Browse the documentation to get started, or explore the source on GitHub.