feat: add pytest testing dashboard with run history and statistics

Add a new Testing Dashboard page that replaces the old Testing Hub with
pytest integration:

- Database models for test runs, results, and collections (TestRun,
  TestResult, TestCollection)
- Test runner service that executes pytest with JSON reporting and
  stores results in the database
- REST API endpoints for running tests, viewing history, and statistics
- Dashboard UI showing pass rates, trends, tests by category, and top
  failing tests
- Alembic migration for the new test_* tables

The dashboard allows admins to:
- Run pytest directly from the UI
- View test run history with pass/fail statistics
- See trend data across recent runs
- Identify frequently failing tests
- Collect test information without running

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-12 23:04:41 +01:00
parent e6ed4a14dd
commit e3a10b4a53
9 changed files with 1539 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ from .architecture_scan import (
ViolationAssignment,
ViolationComment,
)
from .test_run import TestCollection, TestResult, TestRun
from .base import Base
from .company import Company
from .content_page import ContentPage
@@ -46,6 +47,10 @@ __all__ = [
"ArchitectureViolation",
"ViolationAssignment",
"ViolationComment",
# Test Runs
"TestRun",
"TestResult",
"TestCollection",
# Base
"Base",
# User & Auth