{"id":46289707,"url":"https://github.com/nireshs/pytest-html-dashboard","last_synced_at":"2026-03-04T08:01:07.850Z","repository":{"id":325621009,"uuid":"1101746298","full_name":"nireshs/pytest-html-dashboard","owner":"nireshs","description":"Beautiful dashboard-style HTML reports for pytest with charts, error analysis, and visual insights","archived":false,"fork":false,"pushed_at":"2025-11-22T12:05:10.000Z","size":79,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-22T12:20:26.160Z","etag":null,"topics":["dashboard","html-report","html-reporter","html-reports","pytest","pytest-plugin","python","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nireshs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-22T06:44:44.000Z","updated_at":"2025-11-22T12:05:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nireshs/pytest-html-dashboard","commit_stats":null,"previous_names":["nireshs/pytest-html-dashboard"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nireshs/pytest-html-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireshs%2Fpytest-html-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireshs%2Fpytest-html-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireshs%2Fpytest-html-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireshs%2Fpytest-html-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nireshs","download_url":"https://codeload.github.com/nireshs/pytest-html-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nireshs%2Fpytest-html-dashboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","html-report","html-reporter","html-reports","pytest","pytest-plugin","python","testing"],"created_at":"2026-03-04T08:01:06.869Z","updated_at":"2026-03-04T08:01:07.831Z","avatar_url":"https://github.com/nireshs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytest-html-dashboard\n\n[![PyPI version](https://img.shields.io/pypi/v/pytest-html-dashboard.svg)](https://pypi.org/project/pytest-html-dashboard/)\n[![Python versions](https://img.shields.io/pypi/pyversions/pytest-html-dashboard.svg)](https://pypi.org/project/pytest-html-dashboard/)\n[![Downloads](https://img.shields.io/pypi/dm/pytest-html-dashboard.svg)](https://pypi.org/project/pytest-html-dashboard/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub stars](https://img.shields.io/github/stars/nireshs/pytest-html-dashboard.svg)](https://github.com/nireshs/pytest-html-dashboard/stargazers)\n\n**Transform your pytest HTML reports into beautiful, interactive dashboards!**\n\nA comprehensive pytest plugin that enhances HTML reports with interactive charts, intelligent error classification, and modern styling.\n\n## ✨ Features\n\n🎯 **Interactive Charts** - Visualize test results with Chart.js powered donut and pie charts\n🎨 **Modern UI** - Beautiful gradient styling with responsive design\n🔍 **Smart Error Analysis** - Automatic error classification with suggested fixes\n📊 **Comprehensive Tables** - Detailed test information with expandable error details\n🔧 **Highly Configurable** - YAML, CLI, or programmatic configuration\n⚡ **Zero Config** - Works out of the box with sensible defaults\n📱 **Mobile Responsive** - Looks great on all devices\n🎭 **Custom Branding** - Add your logo, colors, and company name\n\n## 📸 Sample Report\n\n### 🖼️ Preview\n\n![Dashboard Report Preview](docs/images/dashboard-preview.png)\n\n\u003e **[🔗 View Live Interactive Report](https://htmlpreview.github.io/?https://github.com/nireshs/pytest-html-dashboard/blob/main/reports/complete_dashboard_report.html)** ← Click to see charts, filters, and interactive features!\n\nOr [download and open locally](reports/complete_dashboard_report.html)\n\n### ✨ What's Included:\n- **📊 Test Status Distribution** - Visual breakdown of passed/failed/skipped tests with interactive charts\n- **📈 Pass Rate Charts** - Overall test success metrics with data labels\n- **🔍 Error Analysis** - Categorized failures with remediation suggestions\n- **📋 Comprehensive Test Table** - Filterable, sortable results with expandable error details\n- **⚡ Step Execution Summary** - Detailed test step information with status tracking\n- **🎨 Modern UI** - Beautiful purple gradient design with hover effects\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\npip install pytest-html-dashboard\n```\n\n### Basic Usage\n\n```bash\npytest --html=report.html --self-contained-html\n```\n\nThat's it! The plugin automatically enhances your HTML report with all features enabled.\n\n## 📖 Configuration\n\n### YAML Configuration\n\nCreate `pytest_html_dashboard.yaml`:\n\n```yaml\nbranding:\n  company_name: \"My Company\"\n  report_title: \"Test Execution Dashboard\"\n  logo_url: \"path/to/logo.png\"  # Or base64 encoded\n  primary_color: \"#667eea\"\n  secondary_color: \"#764ba2\"\n\ncharts:\n  enable_charts: true\n  chart_height: 300\n  chart_animation: true\n\nreport:\n  enable_enhanced_reporting: true\n  enable_error_classification: true\n  show_timestamps: true\n```\n\n### Command Line Options\n\n```bash\npytest --html=report.html \\\n       --dashboard-company-name=\"My Company\" \\\n       --dashboard-report-title=\"Test Dashboard\" \\\n       --dashboard-primary-color=\"#667eea\"\n```\n\n### Programmatic Configuration\n\n```python\n# conftest.py\nfrom pytest_html_dashboard import ReporterConfig, BrandingConfig\n\ndef pytest_configure(config):\n    branding = BrandingConfig(\n        company_name=\"My Company\",\n        report_title=\"Custom Dashboard\",\n        primary_color=\"#667eea\"\n    )\n\n    reporter_config = ReporterConfig(branding=branding)\n    config._dashboard_config = reporter_config\n```\n\n## 📊 Configuration Options\n\n### Branding\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `company_name` | \"Test Automation Framework\" | Your company/project name |\n| `report_title` | \"Test Execution Dashboard\" | Report header title |\n| `logo_url` | None | Logo image (URL or base64) |\n| `primary_color` | \"#004488\" | Primary theme color |\n| `secondary_color` | \"#0066CC\" | Secondary theme color |\n| `success_color` | \"#4CAF50\" | Success indicator color |\n| `failure_color` | \"#f44336\" | Failure indicator color |\n\n### Charts\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `enable_charts` | true | Enable/disable charts |\n| `chart_height` | 300 | Chart height in pixels |\n| `chart_animation` | true | Animated chart transitions |\n| `show_pass_rate_chart` | true | Display pass rate visualization |\n| `show_status_distribution_chart` | true | Display status breakdown |\n\n### Report Features\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `enable_enhanced_reporting` | true | Enable all enhanced features |\n| `enable_error_classification` | true | Categorize and analyze errors |\n| `enable_comprehensive_table` | true | Show detailed test table |\n| `max_error_message_length` | 100 | Truncate long error messages |\n| `show_timestamps` | true | Display test execution times |\n| `show_duration` | true | Show test durations |\n\n## 🎯 CI/CD Integration\n\n### GitHub Actions\n\n```yaml\n- name: Run tests\n  run: pytest --html=report.html --self-contained-html\n\n- name: Upload report\n  uses: actions/upload-artifact@v3\n  with:\n    name: test-report\n    path: report.html\n```\n\n### Jenkins\n\n```groovy\npipeline {\n    stages {\n        stage('Test') {\n            steps {\n                sh 'pytest --html=report.html --self-contained-html'\n            }\n        }\n    }\n    post {\n        always {\n            publishHTML([\n                reportDir: '.',\n                reportFiles: 'report.html',\n                reportName: 'Test Dashboard'\n            ])\n        }\n    }\n}\n```\n\n### GitLab CI\n\n```yaml\ntest:\n  script:\n    - pytest --html=report.html --self-contained-html\n  artifacts:\n    when: always\n    paths:\n      - report.html\n    expire_in: 30 days\n```\n\n## 📦 Examples\n\nThe repository contains:\n- `tests/test_dashboard_features.py` - Comprehensive test suite demonstrating all features\n- `config/sample_config.yaml` - Sample configuration file\n- `reports/complete_dashboard_report.html` - **Sample generated report**\n- `examples/` - Additional examples and demos\n\nRun the tests:\n```bash\npytest tests/test_dashboard_features.py --html=reports/report.html --self-contained-html\n```\n\n## 🔍 What's Enhanced?\n\n### Interactive Features\n- ✅ Click column headers to sort table data\n- ✅ Filter tests by status (passed/failed/skipped)\n- ✅ Filter by error category\n- ✅ Search tests by name\n- ✅ Click \"View Error\" buttons for detailed error information\n- ✅ Hover over charts for detailed statistics\n\n### Visual Enhancements\n- ✅ Modern gradient backgrounds\n- ✅ Animated charts with data labels\n- ✅ Color-coded test status indicators\n- ✅ Responsive layout for mobile devices\n- ✅ Professional typography and spacing\n- ✅ Sticky table headers for easy navigation\n\n### Error Intelligence\nAutomatically categorizes errors into:\n- 🔴 **Assertion Failures** - Test logic issues\n- ⏱️ **Timeout Errors** - Performance problems\n- 🔌 **Connection Errors** - Network/API issues\n- ⚙️ **Configuration Errors** - Setup problems\n- 📦 **Import Errors** - Dependency issues\n- 🐛 **Runtime Errors** - Execution failures\n\nEach error includes:\n- Error type and message\n- Full stack trace\n- **Suggested remediation steps**\n- Context and timestamp\n\n## 🆚 Comparison with pytest-html\n\n| Feature | pytest-html | pytest-html-dashboard |\n|---------|:-----------:|:---------------------:|\n| Basic HTML reports | ✅ | ✅ |\n| Interactive charts | ❌ | ✅ |\n| Error classification | ❌ | ✅ |\n| Custom branding | Limited | ✅ Full |\n| Filter \u0026 sort | ❌ | ✅ |\n| Suggested actions | ❌ | ✅ |\n| Mobile responsive | Partial | ✅ Full |\n| Configuration | Limited | ✅ Extensive |\n\n## 🛠️ Development\n\n### Setup\n\n```bash\ngit clone https://github.com/nireshs/pytest-html-dashboard.git\ncd pytest-html-dashboard\npython -m venv .venv\nsource .venv/bin/activate  # Windows: .venv\\Scripts\\activate\npip install -e \".[dev]\"\n```\n\n### Run Tests\n\n```bash\npytest tests/ --cov=pytest_html_dashboard --cov-report=html\n```\n\n### Build Package\n\n```bash\npython -m build\n```\n\n## 🤝 Contributing\n\nContributions welcome! Please:\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes with tests\n4. Submit a pull request\n\n## 📝 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## 🙏 Credits\n\n- Built on [pytest](https://pytest.org/) and [pytest-html](https://github.com/pytest-dev/pytest-html)\n- Charts by [Chart.js](https://www.chartjs.org/)\n- Modern design inspired by contemporary dashboard UIs\n\n## 📮 Support\n\n- 📧 Email: niresh.shanmugam@gmail.com\n- 🐛 Issues: [GitHub Issues](https://github.com/nireshs/pytest-html-dashboard/issues)\n- 💬 Discussions: [GitHub Discussions](https://github.com/nireshs/pytest-html-dashboard/discussions)\n\n## 🗺️ Roadmap\n\n- [x] Historical test trend analysis ✅ v1.2.0\n- [x] Real-time test execution dashboard ✅ v1.2.0\n- [x] AI-powered error analysis ✅ v1.2.0\n- [ ] Test comparison between runs\n- [ ] PDF export capability\n- [ ] Additional chart types (bar, line, scatter)\n- [ ] Custom theme marketplace\n- [ ] Integration with test management tools\n\n## 🆕 v1.2.0 Features\n\n### 📊 Historical Tracking\nTrack test results over time with SQLite database storage:\n- **Automatic tracking** of all test runs with `--enable-history`\n- **Trend analysis** showing pass rate changes, duration trends\n- **Flaky test detection** identifies tests with inconsistent behavior\n- **Database storage** with configurable path (`--history-db PATH`)\n\n```bash\npytest --enable-history --html=report.html\n```\n\n### 🤖 AI Error Analysis\nIntelligent error pattern detection and suggestions:\n- **Pattern-based analysis** (local, no API key required)\n- **Error categorization** by type (AssertionError, TypeError, etc.)\n- **Actionable insights** with root cause, quick fixes, prevention tips\n- **Optional AI providers** (OpenAI, Anthropic) for deeper analysis\n\n```bash\n# Local analysis (default)\npytest --html=report.html\n\n# With OpenAI\npytest --ai-provider=openai --ai-api-key=sk-... --html=report.html\n```\n\n### 📡 Real-Time Dashboard\nLive test execution monitoring via WebSocket:\n- **WebSocket server** on port 8888 (configurable)\n- **Live updates** as tests execute\n- **Session events** (start, test results, finish)\n- **Clean lifecycle** management with automatic startup/shutdown\n\n```bash\npytest --realtime-dashboard --html=report.html\n```\n\n### 🎯 All Features Combined\n```bash\npytest --enable-history --realtime-dashboard --html=report.html\n```\n\n## 📊 v1.2.0 Configuration Options\n\n### Historical Tracking\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--enable-history` | Enable historical tracking | False |\n| `--disable-history` | Disable historical tracking | - |\n| `--history-db PATH` | Custom database path | test-history.db |\n\n### Real-Time Dashboard\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--realtime-dashboard` | Enable WebSocket server | False |\n| `--realtime-port PORT` | WebSocket port | 8888 |\n\n### AI Analysis\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--ai-provider PROVIDER` | AI provider (local/openai/anthropic) | local |\n| `--ai-api-key KEY` | API key for external AI providers | - |\n\n### YAML Configuration (v1.2.0)\n\n```yaml\nhistorical:\n  enable_tracking: true\n  database_path: \"test-history.db\"\n  show_trends: true\n  flaky_detection: true\n  retention_days: 90\n\nrealtime:\n  enable_realtime: false\n  websocket_port: 8888\n  poll_interval: 1.0\n\nai:\n  enable_ai_analysis: true\n  provider: \"local\"  # or \"openai\", \"anthropic\"\n  api_key: \"\"\n  pattern_matching: true\n```\n\n## 📈 Performance Impact\n\n| Feature | Overhead | Impact |\n|---------|----------|--------|\n| Historical Tracking | ~5-10ms per test run | Minimal |\n| AI Pattern Analysis | ~50-100ms total | Low |\n| Real-Time WebSocket | ~1-2ms per test | Very Low |\n| **Total** | **\u003c1% of test time** | **Negligible** |\n\n## 📄 Changelog\n\n### v1.2.0 (2025-11-24)\n- 🗄️ **Historical Tracking**: SQLite database for test trends and flaky detection\n- 🤖 **AI Error Analysis**: Pattern-based error detection with actionable insights\n- 📡 **Real-Time Dashboard**: WebSocket server for live test monitoring\n- 🎯 **CLI Options**: Complete command-line control for all features\n- ⚙️ **Config Override**: CLI flags override config file settings\n- 📊 **Trend Visualization**: Historical pass rate and duration charts\n- 🔍 **Flaky Detection**: Automatic identification of inconsistent tests\n\n### v1.1.0 (2025-11-22)\n- ✨ Complete dashboard enhancement system\n- 📊 Interactive Chart.js visualizations\n- 🎨 Modern gradient styling with responsive design\n- 🔍 Intelligent error classification\n- ⚙️ Comprehensive configuration system\n- 📋 Enhanced test tables with filter/sort\n- 🚀 Automatic enhancement via pytest hooks\n\n---\n\n⭐ **Star us on GitHub if you find this useful!** ⭐\n\nMade with ❤️ for the pytest community\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnireshs%2Fpytest-html-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnireshs%2Fpytest-html-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnireshs%2Fpytest-html-dashboard/lists"}