Start here
A DAG file that fails to parse does not fail like a task. No run starts, so no task fails, and task alerts do not fire.
The UI shows an import error, but only to someone who looks. So the most useful tests run before deployment, in layers from cheap to expensive:
| Layer | It catches | Needs |
|---|---|---|
| Lint (ruff) | Old Airflow 2 code, such as schedule_interval. | Nothing. It reads the code. |
| Integrity test | Files that do not parse, cycles, missing settings. | Airflow installed, no server. |
| Unit tests | Wrong business rules, such as counting a refund. | Plain Python. |
| dag.test() or dags test | Tasks that fail when they really run. | Airflow, and test data. |
Then the chapter shows how DAG code reaches production, and how to check that your change is live.
