TestScope for Visual Studio Code
Deterministic code coverage analysis — surface actionable test coverage insights.
Features
- Analyze Repository — run coverage analysis on your workspace
- Problems Panel — view findings as VS Code diagnostics with severity
- Tree View — browse results grouped by severity with click-to-navigate
- Export as Markdown — export the latest report as a formatted
.md document
- Copy Report JSON — copy raw analysis JSON to clipboard
Keyboard Shortcuts
| Shortcut |
Command |
Ctrl+Alt+A (Cmd+Alt+A on Mac) |
Analyze Repository |
Requirements
- TestScope CLI installed:
pip install testscope-cli
- VS Code 1.85.0 or higher
Commands
| Command |
Description |
| TestScope: Analyze Repository |
Run analysis on current workspace |
| TestScope: Show Last Report |
Display last analysis in Output channel |
| TestScope: Copy Report JSON |
Copy raw JSON to clipboard |
| TestScope: Export Report as Markdown |
Export report as formatted markdown |
| TestScope: Configure CLI Path |
Open settings |
| TestScope: Refresh |
Re-run analysis |
Settings
| Setting |
Default |
Description |
testscope.cliPath |
"" |
Absolute path to testscope CLI (auto-discovers if empty) |
testscope.useWorkspaceVenv |
true |
Look for CLI in workspace .venv |
testscope.timeoutSeconds |
60 |
CLI command timeout (5–600 s) |
testscope.autoAnalyzeOnOpen |
false |
Run analysis when opening workspace |
testscope.logLevel |
"info" |
Output channel log level |
How It Works
This extension is a thin wrapper around the testscope CLI:
- Discovers CLI (settings → venv → PATH → python -m)
- Runs
testscope analyze <repo> --json
- Validates output against frozen schema (v0.1)
- Publishes diagnostics to Problems panel
Severity comes from each diagnostic's severity field, not from the overall status.
CLI Discovery
- User Setting —
testscope.cliPath (explicit wins)
- Workspace Venv —
.venv/bin/testscope or .venv/Scripts/testscope.exe
- PATH —
testscope executable
- Python Module —
python -m testscope_cli
Troubleshooting
CLI Not Found
pip install testscope-cli
Or set testscope.cliPath to the full path in settings.
Incompatible Schema Version
pip install --upgrade testscope-cli
View Output
Open the Output panel (Ctrl+Shift+U) and select "TestScope".
License
MIT
| |