#!/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}%")