Skip to main content

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
string
Override the auto-detected test command. Leave blank to use auto-detection.
string
Run tests only in a specific file.
string
Filter by test name pattern. Passes --grep to vitest/jest or -k to pytest.
boolean
default:"false"
Enable code coverage reporting.

Examples

Response Format

Framework Auto-Detection

The tool checks for the following config files in order:

Timeouts

Tests are limited to 2 minutes (120,000ms) by default. Long-running integration test suites should use the command override to set a higher timeout:

Output Truncation

Raw test output is capped at 200,000 characters. For very large test suites, use the file or grep parameters to narrow down which tests to run.

File Operations

Read test files to understand what they test before running.

Code Analysis

Lint and type-check in addition to running tests.