Skip to content

Latest commit

 

History

History
77 lines (56 loc) · 2.29 KB

README.md

File metadata and controls

77 lines (56 loc) · 2.29 KB

Apache Groovy Apache Kafka Spock Framework JUnit5 Gradle Docker LinkedIn

Kafka Streams Testing

Example project to test producer-consumer Kafka Streams using Spock Framework with Groovy.

Built With

Project Architecture

KafkaStreamsTesting
├── src
│   ├── main
│       ├── groovy/com/example/testautomation
│           ├── helpers
│   ├── test
│       ├── groovy/com/example/testautomation
│           ├── PublishSubscribeRecordSpec

Getting Started

1. Build:

$ gradle build

2. Run Tests:

$ gradle -Dtest.single=PublishSubscribeRecordSpec test

Docker

1. Pull spotify/kafka:

$ docker pull spotify/kafka

2. Run Container:

$ docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=0.0.0.0 --env ADVERTISED_PORT=9092 spotify/kafka

2. Open Container Bash:

$ docker exec -it <container_id> /bin/bash

Links