astro dev pytest
The behavior and format of this command are the same for both Astro and Software.
Run unit tests for your data pipelines on Astro with pytest
, a testing framework for Python. When you run this command, the Astro CLI creates a local Python environment that includes your dag code, dependencies, and Astro Runtime Docker image. The CLI then runs any pytests in the tests
directory of your Astro project and shows you the results of those tests in your terminal.
The command runs pytest
in a container. If your test generates artifacts, such as code coverage reports, you can output the artifacts to the include
folder of your Astro project so they can be accessed after the test has finished.
For more information on this functionality, see Test your Astro project locally.
This command requires Astro Runtime version
4.1.0
+. For more information, see Astro Runtime Release Notes.