A VS Code extension that integrates with pytest-html-plus to surface test results directly inside VS Code. Get instant visibility into your test health with a clean, intuitive sidebar experience.
- Test Summary - Total, passed, failed, and skipped counts with visual progress bar
- All Test Types - View failed, passed, and skipped tests (collapsible sections)
- Expandable Errors - 2-line preview with "Show more" for full error messages
- One-Click Navigation - Jump directly to test source code
- Live Updates - Auto-refreshes when report files change
- Auto-Detection - Finds report files automatically
-
Run pytest with pytest-html-plus:
pytest --json-report --json-report-file=final_report.json
-
Open the sidebar by clicking the test flask icon in the Activity Bar
-
Click any test to jump to its source code
The extension automatically searches for final_report.json in common locations. No configuration needed!
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Run "Pytest HTML Plus: Configure Report Path"
- Choose: Browse, Enter path, or Auto-detect
reporterplus.reportJsonPath- Path to report file (empty for auto-detect)reporterplus.autoRefresh- Auto-refresh on file changes (default:true)reporterplus.showErrorSnippets- Show error messages (default:true)reporterplus.maxErrorLength- Max characters for error snippets (default:150)
The extension supports pytest-html-plus JSON format:
{
"filters": {
"total": 45,
"passed": 42,
"failed": 3,
"skipped": 0
},
"results": [
{
"test": "test_name",
"nodeid": "tests/test_file.py::test_name",
"status": "failed",
"file": "tests/test_file.py",
"line": 15,
"error": "AssertionError: ..."
}
]
}Pytest HTML Plus: Configure Report Path- Set report file locationPytest HTML Plus: Refresh Test Results- Manually refresh sidebar
- Node.js 18+
- VS Code 1.80+
git clone https://github.com/reporterplus/pytest-html-plus-vscode
cd pytest-html-plus-vscode
npm install
# Build
npm run build- Open project in VS Code
- Press
F5to launch Extension Development Host - Test with the included
sample_report.json
npm install -g @vscode/vsce
vsce packageThis extension follows VS Code's native design language:
- Minimal footprint - No unnecessary UI elements
- Native components - Uses VS Code CSS variables
- Semantic colors - Green for passed, red for failed, yellow for skipped
- Fast rendering - Optimized for <100ms updates
- Silent failures - Graceful error handling without noisy popups
Extension not showing results?
- Verify report file exists and is valid JSON
- Check report path in settings
- Try "Auto-detect" command
Navigation not working?
- Ensure file paths in report are relative to workspace root
- Or use absolute paths
MIT License - see LICENSE for details.