Test Tracer
Bidirectional test-to-code linking — see which tests cover a code path, and see uncovered lines at a glance.
The Problem
Standard coverage tools tell you a line was executed. They don't tell you which test executed it, or which scenario covers a specific branch. Reading implementation code, you don't know what's tested. Reading test code, you can't tell which lines it exercises. The connection between tests and code is invisible.
What It Does
Test Tracer loads your LCOV coverage report and renders it directly in the editor:
- Green highlights on covered lines
- Red highlights on uncovered lines (with hover tooltip)
- Status bar shows overall coverage % for the workspace
- Function-level coverage — which functions were called and how many times
Features
- Visual coverage overlay — green/red line backgrounds with overview ruler markers
- Status bar coverage % — workspace-wide, color-coded (red below 50%)
- Hover on uncovered lines — shows "❌ Not covered by any test"
- Function coverage — parse FNDA records from LCOV to show call counts
- Auto-load — loads coverage automatically if
coverage/lcov.info exists
- Manual load/clear — reload after re-running tests
Getting Started
- Run your test suite with coverage enabled:
# Jest
jest --coverage
# Vitest
vitest run --coverage
# NYC / Istanbul
nyc mocha
- A
coverage/lcov.info file is generated in your project root
- Test Tracer auto-loads it and shows the overlay in your editors
Commands
| Command |
Description |
Test Tracer: Load Coverage Report |
Manually load (or reload) the LCOV file |
Test Tracer: Clear Coverage |
Remove all coverage overlays |
Test Tracer: Jump to Test |
(Coming soon) Jump to the test covering the current line |
Configuration
| Setting |
Default |
Description |
testTracer.coverageFile |
coverage/lcov.info |
Path to the LCOV coverage file (relative to workspace root) |
testTracer.autoLoad |
true |
Automatically load coverage when the file exists |
testTracer.showUncovered |
true |
Highlight uncovered lines in red |
Custom coverage path
{
"testTracer.coverageFile": "reports/lcov.info"
}
Setting Up Coverage Output
Jest (package.json)
{
"jest": {
"collectCoverage": true,
"coverageReporters": ["lcov", "text"],
"coverageDirectory": "coverage"
}
}
Vitest (vite.config.ts)
test: {
coverage: {
provider: 'v8',
reporter: ['lcov', 'text'],
reportsDirectory: './coverage'
}
}
NYC (.nycrc)
{
"reporter": ["lcov", "text"],
"report-dir": "coverage"
}
Reading the Overlay
| Color |
Meaning |
| Subtle green background |
Line executed at least once |
| Subtle red background |
Line never executed |
| Green mark in overview ruler |
Covered (visible when scrolled away) |
| Red mark in overview ruler |
Uncovered (visible when scrolled away) |
Status bar:
$(check) Coverage: 87% — healthy
$(error) Coverage: 34% — below 50%, shown in red
Tips
- Re-run
Test Tracer: Load Coverage Report after running tests to refresh the overlay
- Focus on uncovered lines in the overview ruler — red marks show you where to write tests next
- Use together with PR Preflight (
ts-files-have-tests rule) for a complete test discipline workflow
Release Notes
0.1.1
- Fix: Suppressed the
Coverage file not found at coverage/lcov.info warning that appeared on every startup when no coverage report had been generated yet. Auto-load now silently skips when the file is absent; the warning is only shown when you manually trigger Test Tracer: Load Coverage Report.
0.1.0