Skip to main content

KTestify

Kafka Streams · Integration Testing · Gherkin DSL

What is KTestify?

Integration testing for Kafka Streams,
made easy.

KTestify is a modular, open-source framework for testing Apache Kafka data pipelines. It gives teams a clean Gherkin DSL to produce messages, consume from output topics, and assert record content, all that without writing a single line of Kafka client code.

Everything you need, modular by design.

ktestify-core

Transport-agnostic engine

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.

ktestify-cucumber

Gherkin-native test runner

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.

ktestify-plugin-azureblobPlugin

Azure Blob plugin

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.

Your test suite, in Gherkin.

Write scenarios in plain English. KTestify handles topic wiring, message production, offset management, and record matching — so your tests stay readable.

gherkinorder-stream.feature
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 |

Ready to test your streams?

Browse the documentation to get started, or explore the source on GitHub.