run_tests
Executes pytest, unittest, jest, or vitest suites and returns pass/fail counts with trimmed failure details, collection errors kept separate, and the slowest tests.
Instructions
Run the tests and return counts plus only the useful details of each failure.
EXECUTES THE PROJECT'S CODE. Result: outcome (passed | failed | no_tests | timeout | crashed | startup_error), summary counts (passed/failed/error/skipped/xfailed/xpassed), failures (id, message, file:line of the innermost project frame, the relevant traceback frames only, trimmed stdout/stderr), collection_errors listed separately from failures (import errors never hide as test failures), the 5 slowest tests, and which interpreter was used. On timeout or crash it names the test that was running. The whole process tree is killed at the timeout.
selector: a file, directory or node id (pytest: tests/test_a.py::TestX::test_y; unittest: dotted name; jest/vitest: file path pattern). Default: everything. timeout: seconds, 1-3600. extra_args: only allow-listed flags, e.g. ["-x"], ["-k", "login"], ["-m", "not slow"], ["--maxfail=3"]; anything else is refused. python: interpreter path or 'uv'. runner: force pytest/unittest/jest/vitest (default: auto-detected, see detect_runner).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| python | No | ||
| runner | No | ||
| timeout | No | ||
| selector | No | ||
| extra_args | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||