Skip to content

zebbern/claude-code-guide / skills/test-suite-architect

test-suite-architect

Verified

This skill should be used when establishing comprehensive QA testing processes for any software project. Use when creating test strategies, writing test cases following Google Testing Standards, executing test plans, tracking bugs with P0-P4 classification, calculating quality metrics, or generating progress reports. Includes autonomous execution capability via master prompts and complete documentation templates for third-party QA team handoffs. Implements OWASP security testing and achieves 90% coverage targets.

scripts/calculate_metrics.py

View on GitHub
#!/usr/bin/env python3
"""
Calculate QA Metrics

Analyzes TEST-EXECUTION-TRACKING.csv and generates quality metrics.

Usage:
    python scripts/calculate_metrics.py <tracking-csv-path>
"""

import sys
import csv
from pathlib import Path
from collections import Counter

def calculate_metrics(csv_path):
    """Calculate comprehensive QA metrics from tracking CSV."""

    with open(csv_path, 'r') as f:
        reader = csv.DictReader(f)
        tests = list(reader)

    total = len([t for t in tests if t['Test Case ID'] not in ['', 'Test Case ID']])
    executed = len([t for t in tests if t['Status'] == 'Completed'])
    passed = len([t for t in tests if t['Result'] == 'βœ… PASSED'])
    failed = len([t for t in tests if t['Result'] == '❌ FAILED'])

    pass_rate = (passed / executed * 100) if executed > 0 else 0
    execution_rate = (executed / total * 100) if total > 0 else 0

    # Bug analysis
    bug_ids = [t['Bug ID'] for t in tests if t['Bug ID'] and t['Bug ID'] != '']
    unique_bugs = len(set(bug_ids))

    # Priority analysis
    priority_counts = Counter([t['Priority'] for t in tests if t['Priority']])

    print(f"\n{'='*60}")
    print(f"QA METRICS DASHBOARD")
    print(f"{'='*60}\n")

    print(f"πŸ“Š TEST EXECUTION")
    print(f"   Total Tests:     {total}")
    print(f"   Executed:        {executed} ({execution_rate:.1f}%)")
    print(f"   Not Started:     {total - executed}\n")

    print(f"βœ… TEST RESULTS")
    print(f"   Passed:          {passed}")
    print(f"   Failed:          {failed}")
    print(f"   Pass Rate:       {pass_rate:.1f}%\n")

    print(f"πŸ› BUG ANALYSIS")
    print(f"   Unique Bugs:     {unique_bugs}")
    print(f"   Total Failures:  {failed}\n")

    print(f"⭐ PRIORITY BREAKDOWN")
    for priority in ['P0', 'P1', 'P2', 'P3']:
        count = priority_counts.get(priority, 0)
        print(f"   {priority}:              {count}")

    print(f"\n🎯 QUALITY GATES")
    gates = {
        "Test Execution β‰₯100%": execution_rate >= 100,
        "Pass Rate β‰₯80%": pass_rate >= 80,
        "P0 Bugs = 0": len([t for t in tests if t['Bug ID'].startswith('BUG') and 'P0' in t['Notes']]) == 0,
    }

    for gate, status in gates.items():
        symbol = "βœ…" if status else "❌"
        print(f"   {symbol} {gate}")

    print(f"\n{'='*60}\n")

    return {
        'total': total,
        'executed': executed,
        'passed': passed,
        'failed': failed,
        'pass_rate': pass_rate,
        'execution_rate': execution_rate,
        'unique_bugs': unique_bugs
    }

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python calculate_metrics.py <tracking-csv-path>")
        sys.exit(1)

    csv_path = Path(sys.argv[1])
    if not csv_path.exists():
        print(f"❌ Error: File not found: {csv_path}")
        sys.exit(1)

    calculate_metrics(csv_path)
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall