astronomer avatar

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-code

Installs 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 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

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
1alirezarezvani avatarsecurity-pen-testingalirezarezvani/claude-skillsUse when the user asks to perform security audits, penetration testing, vulnerability scanning, OWASP Top 10 checks, or offensive security assessments. Covers s862skills.sh installs
2ruvnet avatartest-gapsruvnet/rufloDetect missing test coverage and generate test suggestions. Use when the user asks about coverage gaps, untested code, or what tests to write next; also after a755skills.sh installs
3dotnet avatarmcp-csharp-testdotnet/skillsTest C# MCP servers at multiple levels: unit tests for individual tools and integration tests using the MCP client SDK. USE FOR: unit testing MCP tool methods, 706skills.sh installs
4aj-geddes avatarperformance-testingaj-geddes/useful-ai-promptsDesign and execute performance tests to measure response times, throughput, and resource utilization. Use for performance test, load test, JMeter, k6, benchmark609skills.sh installs
5proffesor-for-testing avatarapi-testing-patternsproffesor-for-testing/agentic-qeComprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing. Use when testing APIs or designing API test strate609skills.sh installs
6aj-geddes avatarsecurity-testingaj-geddes/useful-ai-promptsIdentify security vulnerabilities through SAST, DAST, penetration testing, and dependency scanning. Use for security test, vulnerability scanning, OWASP, SQL in607skills.sh installs