Testing with Dagster
In this course, learn best practices for testing, including unit tests, mocks, integration tests and applying them to Dagster.
This course is geared towards users who want to get the most out of their Dagster code. You don't need to be an expert in Dagster, but you should feel comfortable with the basics.
Intermediate level
You'll need to know the basics of Dagster to complete this course. We recommend completing check out the Dagster Essentials course if you've never used Dagster before or want a refresher before getting started.
While you don’t need to be a Python expert to get started, you do need some Python familiarity to complete this course and use Dagster. In Lesson 2, we’ll cover Dagster’s specific installation requirements. Here are some Pythonic concepts used, along with resources to learn about them:
About this course
Project preview
Testing
Testing data applications
Prerequisites and installation
Set up local
Set up Codespace
Overview
Unit tests
Testing dependencies
Knowledge check
Testing assets with run configurations
Knowledge check
Testing asset output types
Testing assets with execution context
Overview
Testing with mocks
Testing with resources
Knowledge check
Materializing resource tests
Mocking resources for testing
Overview
The limits of mocks
Integration tests
Knowledge check
Integration resources
Configuring integration tests
Integration fixtures
Overview
Asset checks
Definitions
Dagster objects
Knowledge check
Code locations
Coming from a heavy dbt background, I was pretty nervous about diving into Dagster testing after just finishing the Dagster Essentials course. In dbt, testing feels pretty straightforward with built-in tests and Great Expectations, but I wasn't su...
Read MoreComing from a heavy dbt background, I was pretty nervous about diving into Dagster testing after just finishing the Dagster Essentials course. In dbt, testing feels pretty straightforward with built-in tests and Great Expectations, but I wasn't sure how testing would work in this more Python-heavy world. This course was exactly what I needed to bridge that gap. The instructor did a great job explaining how Dagster testing compares to what I'm used to - instead of just writing YAML configs for tests, you're actually writing proper Python test functions, which felt intimidating at first but ended up being way more flexible. The asset testing section was a game-changer for me since I'm used to thinking about dbt models, and learning how to test Dagster assets felt like a natural extension. The mocking section was completely new territory (you don't really mock things in dbt), but they explained it in a way that made sense for data work. What I loved most was how they showed integration testing for entire pipelines - something that's always been tricky with dbt projects. By the end, I felt confident that I could actually implement testing in our Dagster migration project instead of just hoping our data transformations work correctly. If you're making the jump from dbt to Dagster like I am, this course makes testing feel way less scary.
Read Less