Test Our Data Pipeline

Learn how to write tests for our data pipeline.

We'll cover the following

Data pipeline

Good production code includes verification tests. We can test our data pipeline to ensure that everything is wired up correctly. Data should move from beginning to end without any error.

There are a few different ways to approach the testing methodology for our pipeline. We could write unit tests for every part of the pipeline or integration tests for the entire pipeline. We’ll look at how to integration test our pipeline to see all pieces work together. This serves us well because we don’t have complex logic in our data pipeline. If we had more complex functions in our Worker, we would most likely want unit tests. We will write our integration test in a new test file. Phoenix’s ChannelCase helper will simulate a connected Socket.

Get hands-on with 1000+ tech skills courses.