TopologyTestDriver
TopologyTestDriver is a Kafka Streams testing utility that runs a topology in memory without requiring a running Kafka cluster.
Kafka Streams in Action, Second Edition
TopologyTestDriver is a Kafka Streams test utility that runs a topology in memory and provides test input, output, and state-store access.
- How it is used
- Tests an entire Kafka Streams topology quickly without requiring a live Kafka broker.
- How deep it goes
- Covers setup, record injection, output assertions, state-store inspection, and timestamp-driven behavior, while deferring broker integration to Testcontainers.
- Examples
- Uses a yelling topology, a stateful poker-score reducer, ordered records, state-store assertions, and timestamped window-processing records.
- What you can do after
- Diagnose/debug with it by piping deterministic records through a topology and comparing emitted results and state-store contents.
Read how Kafka Streams in Action, Second Edition explains TopologyTestDriver →
Kafka for Architects
TopologyTestDriver is a Kafka Streams testing class that executes and verifies a topology without requiring a running Kafka cluster.
- How it is used
- Validates complete Kafka Streams topologies without requiring a running Kafka cluster.
- How deep it goes
- Explains test topics, serialization, output assertions, simulated time, and state inspection; defers real-cluster communication to integration testing.
- Examples
- Uses TestInputTopic and TestOutputTopic to pipe serialized records, verify outputs, advance time, and inspect intermediate state.
- What you can do after
- Evaluate Kafka Streams transformations and stateful behavior without deploying a Kafka cluster.
Related concepts
- processor topologyuses · A processor topology is a directed graph of source, processor, and sink nodes that defines how records flow through a stream-processing application.
- state storeuses · A state store is a storage component that maintains application or processing state and provides mechanisms to access or update it.
- Kafka Streamsused by · Kafka Streams is a client library for building applications that continuously process data from and write data to Apache Kafka topics.
- TestInputTopicproduces · TestInputTopic is a Kafka Streams testing utility that represents an input topic and supplies records to a topology under test.
- TestOutputTopicproduces · TestOutputTopic is a Kafka Streams testing utility that represents an output topic and reads records produced by a topology under test.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

