New advertisers: 50% off your first month with code FIRSTMONTHSee slots
astronomer avatar

Testing Dags

Iterative test-debug-fix loop for Airflow DAGs, starting with a single trigger-and-wait run.

skills.sh installs
1.2K
GitHub stars
463
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the cycle of triggering a DAG, reading failure output, applying a fix, and retesting until success
  • Includes af runs trigger-wait, af runs diagnose, af tasks logs, and af dags errors for diagnosis, plus a common-fixes table
  • Starts with af runs trigger-wait and skips pre-flight checks, debugging only when a run fails
  • Designed for multi-step requests like "test this dag and fix it" rather than simple test or run commands

Install

$ npx -y skills add astronomer/agents --skill testing-dags -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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 list first
  • Call af dags get first
  • Call af dags errors first
  • Use grep or ls or any other bash command
  • Do any "pre-flight checks"

Just trigger the DAG. If it fails, THEN debug.


Testing Workflow Overview

Details

Repository
github.com/astronomer/agents
Categories
Testing & QA, Data Science & Analytics, Debugging
First seen
Apr 16, 2026

More from astronomer/agents

All 24

Similar to Testing Dags

More Testing & QA