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.2.tar.gz
(11.2 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.2.tar.gz.
File metadata
- Download URL: pytest_rca_report-0.1.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00cf71773394a471853f8f2a516b770fa22398905e5f31073dcc621ca99c3499
|
|
| MD5 |
120b5b59f11ec3bcf29d477b26ea792e
|
|
| BLAKE2b-256 |
c5b63632a150c1c429d68e85b03a98a4aeb15a2dedd9887cfa63c6e7cf5a7568
|
File details
Details for the file pytest_rca_report-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pytest_rca_report-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.3 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 |
f88f1d57455d313d4f93a1685c6bc6527b55a58da5a3e4195044b1e8b7dff376
|
|
| MD5 |
1b7e46d88cb5011f8a999ee941b5110a
|
|
| BLAKE2b-256 |
d415313bf2be088147be0845bd9355a4d30685533212ca375db82bfc20e23de5
|