I don’t always test my streams, but when I do I do it in production August 2020 / Kafka Summit
@gamussa @gamussa
||
@jconf.dev @jconf.dev
||
@confluentinc @confluentinc
Agenda 01
04
Kafka Apps
Testing Streams
02
05
Testing basics
Testing ksqlDB
03
06
Can we better?
Conclusion
What are those?
TopologyTestDriver vs TestContainers
Run Kafka and CP locally
Ksql-test-runner vs TestContainers
Always Be Testing
Test with TestContainers
@gamussa
|
@jconf.dev
|
@confluentinc
Senior Developer: - Where did you get this code? Junior Developer: - From Stackoverflow Senior Developer: - from question or answer? @gamussa
|
@jconf.dev
|
@confluentinc
Literate Programming… Do you speak it… https://en.wikipedia.org/wiki/Literate_programming
@gamussa
|
@jconf.dev
|
@confluentinc
Stream Processing is the toolset for dealing with events as they move! @gamussa
|
@jconf.dev
|
@confluentinc
Schema, WUT?
@gamussa
|
@jconf.dev
|
@confluentinc
the KAFKA
STREAMS API is a JAVA API to BUILD REAL-TIME APPLICATIONS
@gamussa
|
@jconf.dev
|
@confluentinc
https://kafka.apache.org/documentation/streams/developer-guide/testing.html
@gamussa
|
@jconf.dev
|
@confluentinc
• TopologyTestDriver • Unit test your Kafka Streams Topology • Doesn’t Require Kafka infra to run • Convenience methods to define input and output • Convenience methods to provide fixtures and validate the results
@gamussa
|
@jconf.dev
|
@confluentinc
What did you learn today?
• What’s Kafka apps apps and how to test them • Producer / Consumer API • Kafka Streams • ksqlDB • How containers and TestContainer help a lot
@gamussa
|
@jconf.dev
|
@confluentinc
Learn Kafka. Start building with Apache Kafka at Confluent Developer. developer.confluent.io
Watch full version https://gamov.dev/developer
Confluent Community Slack
A vibrant community of over 16,000 members Come along and discuss Apache Kafka and Confluent Platform on dedicated channels including #ksqlDB, #connect, #clients, and more
http://cnfl.io/slack
@gamussa
|
@jconf.dev
|
@confluentinc
I don’t always test my streams, but when I do I do it in production August 2020 / Kafka Summit
@gamussa @gamussa
||
@jconf.dev @jconf.dev
||
@confluentinc @confluentinc