
Testing Dags
This handles the full test-debug-fix loop for Airflow DAGs when you need more than a simple test run. The approach is refreshingly direct: just trigger the DAG first with `af runs trigger-wait`, then debug only if it fails. No pre-flight checks, no validation theater. When things break, `af runs diagnose` gives you the full picture in one call, and `af tasks logs` gets you the actual error messages. It's built for iterative workflows where you're bouncing between code changes and test runs until the pipeline works. The workflow diagrams and phase breakdown make it easy to figure out which command you actually need instead of guessing.
- skills.sh installs
- 1.2K
- GitHub stars
- 459
- last updated
- Aug 21, 2026
Install
$ npx -y skills add astronomer/agents --skill testing-dags --agent claude-codeInstalls into .claude/skills of the current project.
Files
DAG Testing Skill
Use af commands to test, debug, and fix DAGs in iterative cycles.
Running the CLI
These commands assume af is on PATH. Run via astro otto to get it automatically, or install standalone with uv tool install astro-airflow-mcp.
Quick Validation with Astro CLI
If the user has the Astro CLI available, these commands provide fast feedback without needing a running Airflow instance:
# Parse DAGs to catch import errors, syntax issues, and DAG-level problems
astro dev parse
# Run pytest against DAGs (runs tests in tests/ directory)
astro dev pytest
Use these for quick validation during development. For full end-to-end testing against a live Airflow instance, continue to the trigger-and-wait workflow below.
FIRST ACTION: Just Trigger the DAG
When the user asks to test a DAG, your FIRST AND ONLY action should be:
af runs trigger-wait <dag_id>
DO NOT:
- Call
af dags listfirst - Call
af dags getfirst - Call
af dags errorsfirst - Use
greporlsor any other bash command - Do any "pre-flight checks"
Just trigger the DAG. If it fails, THEN debug.
Testing Workflow Overview
Sponsors
Details
- Repository
- github.com/astronomer/agents
- Categories
- Testing & QA, DevOps & CI/CD, Debugging, Automation & Workflows, Sales & Marketing
- First seen
- Apr 16, 2026
More from astronomer/agents
All 24- Migrating Airflow 2 To 31.1K
- Setting Up Astro Project1.1K
- Tracing Upstream Lineage1.1K
- Profiling Tables1.1K
- Tracing Downstream Lineage1.1K
- Checking Freshness1K
- Annotating Task Lineage1K
- Cosmos Dbt Core990
- Airflow Hitl980
- Creating Openlineage Extractors960
- Cosmos Dbt Fusion925
- Warehouse Init841
- Deploying Airflow817
- Troubleshooting Astro Deployments655
- Airflow Plugins622
- Managing Astro Deployments595
- Blueprint584
- Init176
- Managing Astro Local Env1.6K
- Airflow1.5K
- Analyzing Data1.4K
- Authoring Dags1.3K
- Debugging Dags1.2K