Beautiful multi-project test reporting dashboard system
Project description
๐ Test Reporting System
A beautiful, multi-project test reporting dashboard system for Playwright/Pytest with shared database support.
โจ Features
- ๐ Beautiful Dashboards - Interactive HTML dashboards with charts and metrics
- ๐ฏ Multi-Project Support - Multiple projects share one database
- ๐ Advanced Analytics - Flaky tests, failure patterns, performance tracking
- ๐ Trend Analysis - Track quality over time
- ๐จ Projects Landing Page - Overview of all your test projects
- ๐ Concurrent Safe - SQLite WAL mode for parallel test runs
- ๐ฆ Easy Integration - Simple pip install and config
๐ Quick Start
Installation
# Install from PyPI
pip install test-reporting
# Or install from source for development
git clone https://github.com/yourusername/test-reporting.git
cd test-reporting
pip install -e .
Setup in Your Test Project
- Add to conftest.py:
# conftest.py
pytest_plugins = ['reporting.plugin']
- Create reporting.ini:
# reporting.ini
[reporting]
project_name = My Test Project
db_path = test_results.db
dashboard_dir = dashboard
retention_days = 365
- Run tests:
pytest
- Generate dashboards:
test-report generate
# or
python -m reporting.cli generate
- Open dashboards:
test-report open
๐ Dashboards
Projects Landing Page
- Overview of all projects
- Health scores
- Quick metrics
- Click to drill down
Overview Dashboard
- Overall health metrics
- Module breakdown
- Failure hotspots
- Quality trends
- Flaky tests
- Performance metrics
Run Details Dashboard
- Latest test run details
- Test-by-test breakdown
- Screenshots and traces
- Error messages
- Execution logs
Test History
- All test runs
- Search and filter
- Trend analysis
- Compare runs
๐ฏ Multi-Project Setup
Shared Database
All projects can share one database:
workspace/
โโโ shared_test_results.db โ Single database
โ
โโโ project-a/
โ โโโ tests/
โ โโโ reporting.ini โ project_name = Project A
โ
โโโ project-b/
โ โโโ tests/
โ โโโ reporting.ini โ project_name = Project B
โ
โโโ project-c/
โโโ tests/
โโโ reporting.ini โ project_name = Project C
Each project's data is tagged with its project name. The landing page shows all projects.
โ๏ธ Configuration
reporting.ini
[reporting]
# Required: Unique project identifier
project_name = My Test Project
# Required: Database location (can be shared across projects)
db_path = test_results.db
# Optional: Dashboard output directory (default: dashboard)
dashboard_dir = dashboard
# Optional: Data retention in days (default: 365)
retention_days = 365
Environment Variables (Alternative)
export PROJECT_NAME="My Test Project"
export DB_PATH="test_results.db"
Config file takes precedence if it exists.
๐ ๏ธ CLI Commands
# Generate all dashboards
test-report generate
# Generate and open in browser
test-report open
# Show quick stats
test-report stats
# Show suite statistics
test-report suites
# Clean up old data
test-report cleanup
๐ Metrics Tracked
Top 10 Quick Win Metrics:
- Retry Analysis - Tests that needed retries
- Failure Type Breakdown - Categorized failures
- Time to Recovery - How long failures persist
- Performance Regressions - Slower tests over time
- Failure Correlations - Tests that fail together
- Error Message Search - Common error patterns
- Test Age Analysis - Old vs new test stability
- Soft Fail Analysis - Timeout and flaky patterns
- Step-Level Failures - Where tests break
- Module Health - Health by test file
Core Metrics:
- Pass rate (overall and functional)
- Test duration
- Flaky test detection
- Failure hotspots
- Quality trends
- Module health
๐ Concurrency
Uses SQLite WAL mode for safe concurrent writes:
# Multiple projects can run tests simultaneously
Project A โ test_results.db โ Safe!
Project B โ test_results.db โ Safe!
Project C โ test_results.db โ Safe!
๐จ Screenshots
Projects Landing Page
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Test Automation Projects โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
Project A โ โ
โ โ Health Score: 95% โ โ
โ โ 120 Tests | 50 Runs โ โ
โ โ [View Dashboard โ] โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ ๏ธ Project B โ โ
โ โ Health Score: 78% โ โ
โ โ 85 Tests | 30 Runs โ โ
โ โ [View Dashboard โ] โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ง Development
Setup for Development
# Clone repo
git clone https://github.com/yourusername/test-reporting.git
cd test-reporting
# Install in editable mode
pip install -e .
# Make changes
# Test in your project
Project Structure
test-reporting/
โโโ reporting/
โ โโโ __init__.py
โ โโโ plugin.py # Pytest plugin
โ โโโ storage.py # Database operations
โ โโโ config.py # Configuration
โ โโโ cli.py # CLI commands
โ โโโ classifier.py # Failure classification
โ โโโ overview_dashboard.py # Overview dashboard
โ โโโ dashboard_generator_v2.py # Run details
โ โโโ history_dashboard.py # Test history
โ โโโ projects_dashboard.py # Projects landing
โโโ setup.py
โโโ README.md
โโโ requirements.txt
โโโ .gitignore
๐ฆ Requirements
- Python >= 3.9
- pytest >= 8.0.0
- playwright >= 1.40.0 (optional, for web tests)
๐ CI/CD Integration
Jenkins
stage('Run Tests') {
steps {
sh 'pytest'
sh 'test-report generate'
archiveArtifacts artifacts: 'dashboard/**/*'
}
}
GitHub Actions
- name: Run Tests
run: pytest
- name: Generate Reports
run: test-report generate
- name: Upload Dashboards
uses: actions/upload-artifact@v2
with:
name: test-dashboards
path: dashboard/
๐ License
MIT License - See LICENSE file
๐ค Contributing
- Fork the repo
- Create feature branch (
git checkout -b feature/amazing-feature) - Make changes
- Test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ง Support
- Issues: https://github.com/yourusername/test-reporting/issues
- Documentation: See README and SETUP_GUIDE.md
๐ Credits
Built with โค๏ธ for better test reporting
Happy Testing! ๐๐โจ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 test_reporting-1.1.2.tar.gz.
File metadata
- Download URL: test_reporting-1.1.2.tar.gz
- Upload date:
- Size: 44.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d00852d5cf291727bf9e046fd9f7e2eb26168bc3a35a578738b2b2e0a10299e4
|
|
| MD5 |
3ea37269d1cdd1b673d8db16e2ff4a3b
|
|
| BLAKE2b-256 |
55f154b01ee2e9777d99ff5af47470379f6090960c76b15b92380337f1744f87
|
File details
Details for the file test_reporting-1.1.2-py3-none-any.whl.
File metadata
- Download URL: test_reporting-1.1.2-py3-none-any.whl
- Upload date:
- Size: 51.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7fc1e32e73c397cf9b06beb961cfb3d0773e2f38b96fde03aafda5d4a7c3bbe
|
|
| MD5 |
0a28d9f30dbd4f27c378a48a0f0e0f6c
|
|
| BLAKE2b-256 |
273fb1fac0a33f5f867bf768cbf824e7401ad4c4228e255ff89bc23d94d06bbc
|