This sample project demonstrates how we can practice contract-driven development and contract testing in a REST (Kotlin) API that sends AVRO messages to a Kafka topic. Here, Specmatic is used to mock calls the Kafka dependency using an AsyncAPI specification.
docker compose up -d- On Unix and Windows Powershell:
docker run --rm --network host -v "$(pwd):/usr/src/app" specmatic/enterprise mock- On Windows CMD Prompt:
docker run --rm --network host -v "%cd%:/usr/src/app" specmatic/enterprise mock- On Unix and Windows Powershell:
./gradlew bootRun- On Windows CMD Prompt:
gradlew bootRun- On Unix and Windows Powershell:
docker run --rm --network host -v "$(pwd):/usr/src/app" specmatic/enterprise test- On Windows CMD Prompt:
docker run --rm --network host -v "%cd%:/usr/src/app" specmatic/enterprise test