Files
novalon-website/test-framework/analyze-results.py
T
张翔 4c8714c12d feat: complete system test fixes - 100% pass rate (85/85)
- Fixed all form tests (20/20 passing)
- Fixed all performance tests (35/35 passing)
- Fixed all SEO and accessibility tests (30/30 passing)
- Enhanced test framework with custom reporting
- Added performance baseline tracking
- Improved test reliability and error handling
2026-03-06 19:37:02 +08:00

27 lines
769 B
Python

#!/usr/bin/env python3
import json
import sys
with open('test-framework/reports/results.json', 'r') as f:
data = json.load(f)
total_tests = 0
passed_tests = 0
failed_tests = 0
for suite in data.get('suites', []):
for spec in suite.get('specs', []):
for test in spec.get('tests', []):
total_tests += 1
for result in test.get('results', []):
status = result.get('status')
if status == 'passed':
passed_tests += 1
elif status == 'failed':
failed_tests += 1
print(f"Total tests: {total_tests}")
print(f"Passed: {passed_tests}")
print(f"Failed: {failed_tests}")
if total_tests > 0:
print(f"Pass rate: {passed_tests/total_tests*100:.1f}%")