SlideShare a Scribd company logo
Your projector is working…
Your projector is working…
Your projector is working…
screenshare
@gamussa | #kafkasummit | @confluentinc
August 2020 / Kafka Summit
I don’t always
test my streams,
but when I do I do
it in production
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
Special thanks
@inponomarev @bsideup
@gamussa | #kafkasummit | @confluentinc
https://gamov.dev/kafkasummit2020
@gamussa | #kafkasummit | @confluentinc
Agenda
@gamussa | #kafkasummit | @confluentinc
Agenda
01
Kafka Apps
What are those?
@gamussa | #kafkasummit | @confluentinc
Agenda
01
Kafka Apps
What are those?
02
Testing basics
Run Kafka and CP locally
@gamussa | #kafkasummit | @confluentinc
Agenda
01
Kafka Apps
What are those?
02
Testing basics
Run Kafka and CP locally
03
Can we better?
Test with TestContainers
@gamussa | #kafkasummit | @confluentinc
Agenda
01
Kafka Apps
What are those?
02
Testing basics
Run Kafka and CP locally
03
Can we better?
Test with TestContainers
04
Testing Streams
TopologyTestDriver vs TestContainers
@gamussa | #kafkasummit | @confluentinc
Agenda
01
Kafka Apps
What are those?
02
Testing basics
Run Kafka and CP locally
03
Can we better?
Test with TestContainers
04
Testing Streams
TopologyTestDriver vs TestContainers
05
Testing ksqlDB
Ksql-test-runner vs TestContainers
@gamussa | #kafkasummit | @confluentinc
Agenda
01
Kafka Apps
What are those?
02
Testing basics
Run Kafka and CP locally
03
Can we better?
Test with TestContainers
04
Testing Streams
TopologyTestDriver vs TestContainers
05
Testing ksqlDB
Ksql-test-runner vs TestContainers
06
Conclusion
Always Be Testing
@gamussa | #kafkasummit | @confluentinc
Preface
@gamussa | #kafkasummit | @confluentinc
Senior Developer:
- Where did you get this code?
Junior Developer:
- From Stackoverflow
Senior Developer:
- from question or answer?
@gamussa | #kafkasummit | @confluentinc
An example from my life:
Kafka Tutorials website
@gamussa | #kafkasummit | @confluentinc
Literate
Programming…
Do you speak it…
https://en.wikipedia.org/wiki/Literate_programming
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
Kafka Apps aka
streams
processing
@gamussa | #kafkasummit | @confluentinc
Stream Processing
is the toolset for
dealing with
events
as they move!
@gamussa | #kafkasummit | @confluentinc
What’s Kafka Apps?
My App
@gamussa | #kafkasummit | @confluentinc
Producers
Consumers
Kafka
@gamussa | #kafkasummit | @confluentinc
Schema, WUT?
@gamussa | #kafkasummit | @confluentinc
Let’s see some code
@gamussa | #kafkasummit | @confluentinc
Kafka Streams for
stream processing
@gamussa | #kafkasummit | @confluentinc
the KAFKA STREAMS API is a
JAVA API to
BUILD REAL-TIME APPLICATIONS
@gamussa | #kafkasummit | @confluentinc
https://kafka.apache.org/documentation/streams/developer-guide/testing.html
@gamussa | #kafkasummit | @confluentinc
Topology Test
driver
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
• TopologyTestDriver
@gamussa | #kafkasummit | @confluentinc
• TopologyTestDriver
• Unit test your Kafka Streams
Topology
@gamussa | #kafkasummit | @confluentinc
• TopologyTestDriver
• Unit test your Kafka Streams
Topology
• Doesn’t Require Kafka infra to run
@gamussa | #kafkasummit | @confluentinc
• TopologyTestDriver
• Unit test your Kafka Streams
Topology
• Doesn’t Require Kafka infra to run
• Convenience methods to define
input and output
@gamussa | #kafkasummit | @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 | #kafkasummit | @confluentinc
Let’s see some code
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
When TTD doesn’t help?
https://gamov.dev/
livestreams-s01e05
@gamussa | #kafkasummit | @confluentinc
Ksqldb for
Stream processing
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
Let’s see some code
@gamussa | #kafkasummit | @confluentinc
Conclusion
@gamussa | #kafkasummit | @confluentinc
What did you learn
today?
@gamussa | #kafkasummit | @confluentinc
What did you learn
today?
@gamussa | #kafkasummit | @confluentinc
What did you learn
today?
•What’s Kafka apps apps
and how to test them
@gamussa | #kafkasummit | @confluentinc
What did you learn
today?
•What’s Kafka apps apps
and how to test them
•Producer / Consumer
API
@gamussa | #kafkasummit | @confluentinc
What did you learn
today?
•What’s Kafka apps apps
and how to test them
•Producer / Consumer
API
•Kafka Streams
@gamussa | #kafkasummit | @confluentinc
What did you learn
today?
•What’s Kafka apps apps
and how to test them
•Producer / Consumer
API
•Kafka Streams
•ksqlDB
@gamussa | #kafkasummit | @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 | #kafkasummit | @confluentinc
@gamussa | #kafkasummit | @confluentinc
Want to learn more?
developer.confluent.io
Learn Kafka.
Start building with
Apache Kafka at
Confluent Developer.
@gamussa | #kafkasummit | @confluentinc
ALL UPCOMING MEETUPS
NEW EVENT EMAIL ALERTS
THE CONFLUENT MEETUP HUB
CNFL.IO/MEETUP-HUB
VIDEOS OF PAST
MEETUPS
SLIDES FROM THE
TALKS
@gamussa | #kafkasummit | @confluentinc
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 | #kafkasummit | @confluentinc

More Related Content

PDF
Building Event Streaming Applications with Pac-Man (Ricardo Ferreira, Conflue...
PDF
Delivering Cloud-Native Data Pipelines with Kafka Connect on Kubernetes | Vik...
PDF
Being an Apache Kafka Developer Hero in the World of Cloud (Ricardo Ferreira,...
PPT
What Crimean War gunboats teach us about the need for schema registries
PDF
Crawlers com serverless @ Serverless Floripa - 1st commit
PPTX
Serverless Workshop - Tomato Restaurant Rating App
PDF
State management with GraphQL [Angular Minsk, Online, 13.06.20]
PPTX
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung
Building Event Streaming Applications with Pac-Man (Ricardo Ferreira, Conflue...
Delivering Cloud-Native Data Pipelines with Kafka Connect on Kubernetes | Vik...
Being an Apache Kafka Developer Hero in the World of Cloud (Ricardo Ferreira,...
What Crimean War gunboats teach us about the need for schema registries
Crawlers com serverless @ Serverless Floripa - 1st commit
Serverless Workshop - Tomato Restaurant Rating App
State management with GraphQL [Angular Minsk, Online, 13.06.20]
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung

What's hot (20)

PDF
AWS Community Day Bangkok 2019 - Hello ClaudiaJS
PPTX
Serverless by examples and case studies
PDF
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
PPTX
Serverless Architectures and Continuous Delivery
PDF
Fury road to a worldwide API - API Days - December 2015
PDF
Algolia - Hosted Search API
PDF
Should you read Kafka as a stream or in batch? Should you even care? | Ido Na...
PDF
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
PDF
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
PDF
Algolia's Fury Road to a Worldwide API
PDF
Building a reliable, scalable service with Clojure and Core.async
PDF
Scaling Uber
PDF
Writing Alexa Voice Skills With NodeJS (with a little IoT)
PDF
AWS Community Day Bangkok 2019 - Building & Deploying AWS Lambda with Serverl...
PDF
E2E Data Pipeline - Apache Spark/Airflow/Livy
PPTX
GAB 2017 - Logic Apps and Azure Functions
PDF
Saving Money by Optimizing Your Cloud Add-On Infrastructure
PDF
Keystone - ApacheCon 2016
PPTX
Amazingly Simple Serverless Go
PDF
Meetup Angular.JS #12 Paris
AWS Community Day Bangkok 2019 - Hello ClaudiaJS
Serverless by examples and case studies
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
Serverless Architectures and Continuous Delivery
Fury road to a worldwide API - API Days - December 2015
Algolia - Hosted Search API
Should you read Kafka as a stream or in batch? Should you even care? | Ido Na...
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
Algolia's Fury Road to a Worldwide API
Building a reliable, scalable service with Clojure and Core.async
Scaling Uber
Writing Alexa Voice Skills With NodeJS (with a little IoT)
AWS Community Day Bangkok 2019 - Building & Deploying AWS Lambda with Serverl...
E2E Data Pipeline - Apache Spark/Airflow/Livy
GAB 2017 - Logic Apps and Azure Functions
Saving Money by Optimizing Your Cloud Add-On Infrastructure
Keystone - ApacheCon 2016
Amazingly Simple Serverless Go
Meetup Angular.JS #12 Paris
Ad

Similar to I Don’t Always Test My Streams, But When I Do, I Do it in Production (Viktor Gamov, Confluent) Kafka Summit 2020 (20)

PDF
NAB Tech Talk
PDF
Crossing the Streams: Rethinking Stream Processing with KStreams and KSQL
PDF
Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov ...
PDF
The Awakening of the New Event-Driven (Beast) (Viktor Gamov, Confluent) Kafka...
PPTX
Kafka Streams for Java enthusiasts
PDF
Testing Kafka containers with Testcontainers: There and back again with Vikto...
PDF
What is Apache Kafka®?
PDF
Testing Kafka Containers With Testcontainers: There and Back Again With Vikto...
PDF
What is Apache Kafka, and What is an Event Streaming Platform?
PDF
Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov,...
PDF
Hadoop made fast - Why Virtual Reality Needed Stream Processing to Survive
PDF
Introducción a Stream Processing utilizando Kafka Streams
PDF
Leveraging Kafka for Big Data in Real Time Bidding, Analytics, ML & Campaign ...
PDF
Case-Study: Building Real-Time Applications at Scale-Cyclist Crash Detection ...
PPT
Kafka Explainaton
PDF
Crossing the streams viktor gamov
PDF
Crossing the Streams: Event Streaming with Kafka Streams
PDF
How to Build Streaming Apps with Confluent II
PPTX
Kafka Summit NYC 2017 Hanging Out with Your Past Self in VR
PDF
Riviera Jug - 20/03/2018 - Kafka streams
NAB Tech Talk
Crossing the Streams: Rethinking Stream Processing with KStreams and KSQL
Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov ...
The Awakening of the New Event-Driven (Beast) (Viktor Gamov, Confluent) Kafka...
Kafka Streams for Java enthusiasts
Testing Kafka containers with Testcontainers: There and back again with Vikto...
What is Apache Kafka®?
Testing Kafka Containers With Testcontainers: There and Back Again With Vikto...
What is Apache Kafka, and What is an Event Streaming Platform?
Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov,...
Hadoop made fast - Why Virtual Reality Needed Stream Processing to Survive
Introducción a Stream Processing utilizando Kafka Streams
Leveraging Kafka for Big Data in Real Time Bidding, Analytics, ML & Campaign ...
Case-Study: Building Real-Time Applications at Scale-Cyclist Crash Detection ...
Kafka Explainaton
Crossing the streams viktor gamov
Crossing the Streams: Event Streaming with Kafka Streams
How to Build Streaming Apps with Confluent II
Kafka Summit NYC 2017 Hanging Out with Your Past Self in VR
Riviera Jug - 20/03/2018 - Kafka streams
Ad

More from confluent (20)

PDF
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
PPTX
Webinar Think Right - Shift Left - 19-03-2025.pptx
PDF
Migration, backup and restore made easy using Kannika
PDF
Five Things You Need to Know About Data Streaming in 2025
PDF
Data in Motion Tour Seoul 2024 - Keynote
PDF
Data in Motion Tour Seoul 2024 - Roadmap Demo
PDF
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
PDF
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
PDF
Data in Motion Tour 2024 Riyadh, Saudi Arabia
PDF
Build a Real-Time Decision Support Application for Financial Market Traders w...
PDF
Strumenti e Strategie di Stream Governance con Confluent Platform
PDF
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
PDF
Building Real-Time Gen AI Applications with SingleStore and Confluent
PDF
Unlocking value with event-driven architecture by Confluent
PDF
Il Data Streaming per un’AI real-time di nuova generazione
PDF
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
PDF
Break data silos with real-time connectivity using Confluent Cloud Connectors
PDF
Building API data products on top of your real-time data infrastructure
PDF
Speed Wins: From Kafka to APIs in Minutes
PDF
Evolving Data Governance for the Real-time Streaming and AI Era
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
Webinar Think Right - Shift Left - 19-03-2025.pptx
Migration, backup and restore made easy using Kannika
Five Things You Need to Know About Data Streaming in 2025
Data in Motion Tour Seoul 2024 - Keynote
Data in Motion Tour Seoul 2024 - Roadmap Demo
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
Data in Motion Tour 2024 Riyadh, Saudi Arabia
Build a Real-Time Decision Support Application for Financial Market Traders w...
Strumenti e Strategie di Stream Governance con Confluent Platform
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
Building Real-Time Gen AI Applications with SingleStore and Confluent
Unlocking value with event-driven architecture by Confluent
Il Data Streaming per un’AI real-time di nuova generazione
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Break data silos with real-time connectivity using Confluent Cloud Connectors
Building API data products on top of your real-time data infrastructure
Speed Wins: From Kafka to APIs in Minutes
Evolving Data Governance for the Real-time Streaming and AI Era

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
Spectroscopy.pptx food analysis technology
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
Understanding_Digital_Forensics_Presentation.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Programs and apps: productivity, graphics, security and other tools
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology

I Don’t Always Test My Streams, But When I Do, I Do it in Production (Viktor Gamov, Confluent) Kafka Summit 2020