Overview
test_run auto-detects the test framework from your project configuration and runs tests with structured output. Instead of raw terminal output, it returns parsed results: pass/fail/skip counts, failure details with file:line locations, and optionally coverage data.
Supported frameworks: vitest, jest, pytest, go test, cargo test, mocha, jasmine, and more.
Tool: test_run
Security level: moderate | Tier: Standard
Override the auto-detected test command. Leave blank to use auto-detection.
Run tests only in a specific file.
Filter by test name pattern. Passes
--grep to vitest/jest or -k to pytest.Enable code coverage reporting.
Examples
Response Format
Framework Auto-Detection
The tool checks for the following config files in order:| Config File | Framework |
|---|---|
vitest.config.ts / vitest.config.js | vitest |
jest.config.ts / jest.config.js | jest |
pytest.ini / pyproject.toml | pytest |
go.mod | go test |
Cargo.toml | cargo test |
package.json with "jest" key | jest |
package.json with "vitest" key | vitest |
Timeouts
Tests are limited to 2 minutes (120,000ms) by default. Long-running integration test suites should use thecommand override to set a higher timeout:
Output Truncation
Raw test output is capped at 200,000 characters. For very large test suites, use thefile or grep parameters to narrow down which tests to run.