run-tests

Identify changed files and run affected test suites via scripts/run-tests.

648|537|Updated Jun 20, 2016
One-click install
npx skills add https://github.com/DataDog/dd-trace-py --skill run-tests-datadog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-tests
Source: https://github.com/DataDog/dd-trace-py/tree/main/.claude/skills/run-tests
Command: npx skills add https://github.com/DataDog/dd-trace-py --skill run-tests-datadog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps validate code changes by intelligently selecting and running the appropriate test suites, reducing wasted testing time and avoiding full-suite runs when unnecessary.

Core Features & Use Cases

  • Smart test selection: Discover and run only the test suites affected by your changes.
  • Minimal venvs: Validate with 1-2 venvs initially to speed iteration.
  • Docker-integrated: Automatically manages Docker services when needed.
  • Dry-run support: See what would run before executing tests.

Quick Start

List edited files and discover matching suites: scripts/run-tests --list <edited-files> Run the targeted tests in a chosen venv: scripts/run-tests --venv <hash> -- -- (pytest args)

Frequently Asked Questions about run-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run only the tests affected by my code changes?

Smart test selection identifies which test suites are affected by your edits. Use scripts/run-tests --list <edited-files> to discover matching suites, then run only those tests instead of the full suite, reducing validation time significantly.

Can I validate changes with Docker services automatically?

Yes. The Skill automatically manages Docker services when needed for testing, eliminating manual setup and teardown. This works seamlessly with targeted test runs across your affected code.

How do I speed up test iteration with minimal virtual environments?

Validate with 1-2 venvs initially rather than creating multiple environments. Run scripts/run-tests --venv <hash> to execute targeted tests in a chosen environment, accelerating feedback during development cycles.

What's the best way to preview which tests will run before execution?

Use dry-run support to see what would execute without actually running tests. This lets you verify the correct test suites are selected before committing to a full validation run.

Does this work for test infrastructure changes as well as code edits?

Yes. The Skill handles validation for source code edits, bug fixes, new features, and test infrastructure changes by intelligently discovering affected test suites for each type of modification.