Skip to content

Writing integration tests for DAGs #14096

Discussion options

You must be logged in to vote

You can take a look how we implemented System Tests in Apache Airflow : https://github.com/apache/airflow/blob/master/TESTING.rst#airflow-system-tests

System tests are basically executing an 'example_dag' and wait until it completes. We have a lot of such example DAGs in Airflow and there is an effort ongoing to automate execution of those #10835

This is very much your case under the hood - but done using some of the Airflow classes - loading DAG is done via DagBag and then it is executed using a Local (i think? Maybe it was the Debug one) Executor. All that is packed in SystemTest class that does extra initialization and allows to run it as Pytest test case.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@FredericoCoelhoNunes
Comment options

@potiuk
Comment options

potiuk Feb 5, 2021
Collaborator

@FredericoCoelhoNunes
Comment options

Answer selected by potiuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants