Interactive RCA report generator for pytest runs, with AI-based analysis and visual dashboard
Project description
Pytest-RCA-Report
An interactive Root Cause Analysis (RCA) dashboard for any Pytest project.
Quickly visualize, triage, and investigate test failures with actionable LLM-powered insights.
Features
- Visual summary of all test results (pass/fail/skip), anomalies, and execution times.
- Root Cause Analysis: Highlights failing modules/scripts.
- Interactive test table with search, status filtering, and drilldown for each test case.
- Classification of failures: Distinguishes between likely real bugs and probable test/infrastructure issues.
- Actionable recommendations generated by LLM (e.g. GPT-4).
- Downloadable results in JSON/CSV.
- Summary graphs (pie/bar) and execution time distribution.
- Responsive UI – optimized for both desktop and mobile.
- Works with any Pytest project: Supports unit, integration, and end-to-end tests, as long as JUnit XML is generated.
Demo
Installation
pip install pytest-rca-report
Usage
- Run your tests with JUnit XML output:
pytest --junitxml=pytest-results.xml
- Generate the RCA report:
pytest-rca-report
- View the dashboard:
python -m http.server --directory dashboard
Then open http://localhost:8000/index.html in your browser.
Usage & Navigation
- Results Summary: Top summary of all tests.
- Summary Graphs: Pie & bar charts of pass/fail/skip.
- Log Anomalies: Aggregated errors and warnings across all tests.
- Root Cause Analysis: Failure counts per module/script.
- Execution Time: Histogram & slowest tests listed.
- Actionable Recommendations: Next steps as suggested by the LLM.
- All Testcases Table:
- Search any test by name.
- Filter by status (Passed/Failed/Skipped).
- Click any row for a detailed modal with properties and failure reason.
- Download all results as JSON or CSV.
- Failure Classification: Clear separation between likely real bugs and possible test automation issues.
Requirements
- Python 3.9+
- OpenAI API key (set as
OPENAI_API_KEYin your environment)
Troubleshooting
- If the dashboard doesn't load data, always serve the
dashboardfolder with a local web server (not by opening the HTML file directly).
Roadmap / Suggestions
- Regression trend analysis between runs
- "Mark as Known Issue" UI
- Integration with defect tracking (Jira etc.)
- Team comments on test failures
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest_rca_report-0.1.3.tar.gz
(14.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_rca_report-0.1.3.tar.gz.
File metadata
- Download URL: pytest_rca_report-0.1.3.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2726337dd0c2672f3dc31a58cccb2e4872cb3218e2241a137711756eb42f7e23
|
|
| MD5 |
709b70722853ee5afc57e205c5489d67
|
|
| BLAKE2b-256 |
d83b8d2ad0bb612ddc957e23b64d98a0e7370ba1ea17857e84910a19abfaf408
|
File details
Details for the file pytest_rca_report-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pytest_rca_report-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d4524ed44d59eee8ef6e0e419e4b40bcc3f98a1f3506250233bc3865e206bca
|
|
| MD5 |
b2e3d16f3d1fc716325f0447dc3e17a6
|
|
| BLAKE2b-256 |
da1969ea8053234a8bcf63dd4e0255fb946d1db1e62ea1f56ca3f07420992273
|