Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Validate code changes by intelligently selecting and running the appropriate test suites. Use this when editing code to verify changes work correctly, run tests, validate functionality, or check for regressions. Automatically discovers affected test suites, selects the minimal set of venvs needed for validation, and handles test execution with Docker services as needed.
.claude/skills/microck-run-tests/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 93% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 226% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 319% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 67% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 199% | 0% |
This skill helps you efficiently validate code changes by running the appropriate subset of the test suite. It uses scripts/run-tests to intelligently discover affected tests and run only what's necessary for validation.
Use this skill when you have:
scripts/run-tests or riot via scripts/ddtest)--dry-run first - see what would run before executingdocs/contributing-testing.rst is the source of truth for testing proceduresFirst, determine which files were modified:
I'll use the scripts/run-tests script to discover what test suites match your changes:
bashscripts/run-tests --list <edited-files>
This outputs JSON showing:
Rather than running ALL available venvs (which could take hours), I'll select the minimal set needed to validate your changes:
When you modify files like:
ddtrace/internal/core/*, ddtrace/_trace/*, ddtrace/trace/*ddtrace/_monkey.py, ddtrace/settings/*ddtrace/constants.pyStrategy: Run core tracer + internal tests with 1 venv each
tracer suite with latest Python + internal suite with latest PythonWhen you modify files like:
ddtrace/contrib/flask/*, ddtrace/contrib/django/*, etc.ddtrace/contrib/*/patch.py or integration-specific codeStrategy: Run ONLY the affected integration suite with 1-2 venvs
contrib::flask suite with latest PythonWhen you modify tests/ files (but not test infrastructure):
-- -k test_name or direct test file pathsWhen you modify:
tests/conftest.py, tests/suitespec.yml, scripts/run-tests, riotfile.pyStrategy: Run a quick smoke test suite
internal suite with 1 venv as a sanity checkI'll run the selected venvs using:
bashscripts/run-tests --venv <hash1> --venv <hash2> ...
This will:
If tests pass: ✅ Your changes are validated!
If tests fail: 🔴 I'll:
For re-running specific tests:
bashscripts/run-tests --venv <hash> -- -vv -k test_name
When you encounter test failures, follow this systematic approach:
-vv or -vvv for detailed outputFrom scripts/run-tests --list, you'll see output like:
json{ "suites": [ { "name": "tracer", "venvs": [ { "hash": "abc123", "python_version": "3.8", "packages": "..." }, { "hash": "def456", "python_version": "3.11", "packages": "..." } ] } ] }
--venv DirectlyWhen you have a specific venv hash you want to run, you can use it directly without specifying file paths:
bashscripts/run-tests --venv e06abee
The --venv flag automatically searches all available venvs across all suites, so it works regardless of what files you have locally changed. This is useful when:
Changed file: ddtrace/contrib/internal/flask/patch.py
bashscripts/run-tests --list ddtrace/contrib/internal/flask/patch.py # Output shows: contrib::flask suite available # Select output (latest Python): # Suite: contrib::flask # Venv: hash=e06abee, Python 3.13, flask # Run with --venv directly (searches all venvs automatically) scripts/run-tests --venv e06abee # Runs just Flask integration tests
Changed file: ddtrace/_trace/tracer.py
bashscripts/run-tests --list ddtrace/_trace/tracer.py # Output shows: tracer suite, internal suite available # Select strategy: # - tracer: latest Python (e.g., abc123) # - internal: latest Python (e.g., def456) # Run with --venv directly (searches all venvs automatically) scripts/run-tests --venv abc123 --venv def456 # Validates core tracer and internal components
Changed file: tests/contrib/flask/test_views.py
bashscripts/run-tests --list tests/contrib/flask/test_views.py # Output shows: contrib::flask suite # Run just the specific test: scripts/run-tests --venv flask_py311 -- -vv tests/contrib/flask/test_views.py
First run shows one test failing:
bashscripts/run-tests --venv flask_py311 -- -vv -k test_view_called_twice # Focused on the specific failing test with verbose output
-k filter when re-running failuresgit statusFor comprehensive testing guidance, refer to the contributing documentation:
scripts/run-tests usage examplesWhen to reference these docs:
contributing-testing.rstcontributing.rstcontributing-design.rstbash# Manually check/stop services: docker compose ps docker compose down
tests/suitespec.yml to understand suite patterns-k to run subset of testsThe scripts/run-tests system:
tests/suitespec.ymlriot to manage multiple Python/package combinations as venvs--Primary suites for validation:
tracer: Core tracing functionality testsinternal: Internal component testscontrib::*: Integration with specific libraries (flask, django, etc.)integration_*: Cross-library integration scenariostelemetry, profiling, appsec, llmobs, etc.Some suites require environment setup:
DD_TRACE_AGENT_URL: For snapshot-based tests| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | 12,073 | 4,608 | -62% | 1 | 1 | 0% | 1,954 | 3,762 | +93% | 0 | 0 | — |
case-05 | pass→pass | 10,858 | 4,653 | -57% | 1 | 1 | 0% | 1,754 | 3,745 | +114% | 0 | 0 | — |
case-01 | fail→fail | 11,256 | 2,806 | -75% | 1 | 1 | 0% | 1,929 | 3,352 | +74% | 0 | 0 | — |
case-02 | fail→pass | 7,005 | 6,959 | -1% | 1 | 1 | 0% | 1,264 | 4,121 | +226% | 0 | 0 | — |
case-03 | fail→pass | 5,456 | 6,748 | +24% | 1 | 1 | 0% | 974 | 4,077 | +319% | 0 | 0 | — |
case-04 | fail→pass | 11,934 | 3,793 | -68% | 1 | 1 | 0% | 2,121 | 3,547 | +67% | 0 | 0 | — |
case-07 | fail→pass | 7,296 | 4,296 | -41% | 1 | 1 | 0% | 1,203 | 3,601 | +199% | 0 | 0 | — |
case-08 | fail→pass | 10,982 | 3,683 | -66% | 1 | 1 | 0% | 1,792 | 3,555 | +98% | 0 | 0 | — |
case-09 | fail→pass | 7,150 | 5,056 | -29% | 1 | 1 | 0% | 1,248 | 3,789 | +204% | 0 | 0 | — |
case-10 | fail→pass | 9,760 | 1,387 | -86% | 1 | 1 | 0% | 1,627 | 3,124 | +92% | 0 | 0 | — |
case-11 | fail→pass | 9,648 | 2,340 | -76% | 1 | 1 | 0% | 1,642 | 3,297 | +101% | 0 | 0 | — |
case-12 | pass→pass | 5,176 | 3,208 | -38% | 1 | 1 | 0% | 884 | 3,423 | +287% | 0 | 0 | — |
case-13 | fail→pass | 11,746 | 3,931 | -67% | 1 | 1 | 0% | 1,996 | 3,564 | +79% | 0 | 0 | — |
case-14 | pass→pass | 10,536 | 3,936 | -63% | 1 | 1 | 0% | 1,782 | 3,564 | +100% | 0 | 0 | — |
case-15 | fail→pass | 8,995 | 2,168 | -76% | 1 | 1 | 0% | 1,567 | 3,356 | +114% | 0 | 0 | — |
case-16 | fail→pass | 12,114 | 6,173 | -49% | 1 | 1 | 0% | 2,077 | 4,022 | +94% | 0 | 0 | — |
case-17 | fail→pass | 11,591 | 2,515 | -78% | 1 | 1 | 0% | 1,821 | 3,376 | +85% | 0 | 0 | — |
case-18 | pass→pass | 12,505 | 8,377 | -33% | 1 | 1 | 0% | 2,051 | 3,635 | +77% | 0 | 0 | — |
case-19 | pass→pass | 9,412 | 5,256 | -44% | 1 | 1 | 0% | 1,563 | 3,772 | +141% | 0 | 0 | — |
case-20 | pass→pass | 5,976 | 3,079 | -48% | 1 | 1 | 0% | 1,160 | 3,472 | +199% | 0 | 0 | — |
case-21 | pass→pass | 3,217 | 1,994 | -38% | 1 | 1 | 0% | 428 | 3,203 | +648% | 0 | 0 | — |
case-22 | pass→pass | 7,248 | 3,289 | -55% | 1 | 1 | 0% | 1,315 | 3,454 | +163% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.