# run-tests > Execute test suite and report results. Detects test framework, runs tests, calculates coverage, and formats results for quality gate. - Author: Boudy de Geer - Repository: boudydegeer/scrum-claude - Version: 20251222052721 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/boudydegeer/scrum-claude - Web: https://mule.run/skillshub/@@boudydegeer/scrum-claude~run-tests:20251222052721 --- --- name: run-tests description: Execute test suite and report results. Detects test framework, runs tests, calculates coverage, and formats results for quality gate. --- # Run Tests Skill ## Overview Execute the project's test suite, collect results, and format for quality gate validation. ## When to Use - During `execute-task` (after implementation) - In `quality-gate` pipeline - During `/agile:release` (full suite) ## Framework Detection Auto-detect test framework: ``` IF package.json exists: - "jest" in dependencies → Jest - "mocha" in dependencies → Mocha - "vitest" in dependencies → Vitest IF requirements.txt/pyproject.toml exists: - pytest installed → Pytest - unittest → Unittest IF go.mod exists → Go test IF Cargo.toml exists → Cargo test ``` ## Execution ### Node.js (Jest/Vitest) ```bash npm test -- --coverage --json --outputFile=test-results.json ``` ### Python (Pytest) ```bash pytest --cov --cov-report=json --json-report --json-report-file=test-results.json ``` ### Go ```bash go test ./... -v -coverprofile=coverage.out -json > test-results.json ``` ## Result Format ```json { "summary": { "total": 145, "passed": 143, "failed": 2, "skipped": 0, "duration": 12.5 }, "coverage": { "lines": 87.5, "branches": 82.3, "functions": 91.2 }, "failures": [ { "test": "auth.test.js > login > should reject invalid password", "message": "Expected 401, got 500", "file": "src/auth/login.js", "line": 45 } ] } ``` ## Display Format ``` ┌─────────────────────────────────────────────────────────┐ │ TEST RESULTS │ ├─────────────────────────────────────────────────────────┤ │ │ │ Tests: 143 passed, 2 failed, 145 total │ │ Duration: 12.5s │ │ │ │ Coverage: │ │ Lines: ████████████████████░░ 87.5% │ │ Branches: ████████████████░░░░░░ 82.3% │ │ Functions: ██████████████████░░░░ 91.2% │ │ │ │ Failures: │ │ ✗ auth.test.js:45 │ │ "should reject invalid password" │ │ Expected 401, got 500 │ │ │ └─────────────────────────────────────────────────────────┘ ``` ## Integration Returns structured data for: - `quality-gate` skill (pass/fail decision) - `execute-task` skill (implementation validation) - `/agile:release` command (pre-deploy validation)