Install
openclaw skills install @terr123123/testing-gateA testing gate checker for test coverage, strategy validation, and regression verification.
openclaw skills install @terr123123/testing-gateA general-purpose testing gate checker that validates test coverage, test strategy soundness, and regression necessity. Use it as a quality gate before merging or releasing code.
run_all_checks entry point.clawhub install testing-gate
from src import TestingGate, CoverageMetrics, TestStrategy
gate = TestingGate()
# Check coverage
metrics = CoverageMetrics(line_coverage=92, branch_coverage=80, function_coverage=88)
result = gate.check_coverage(metrics)
print(result.passed, result.score)
# Check test strategy
strategy = TestStrategy(
unit_tests=["test_a", "test_b"],
integration_tests=["test_int"],
e2e_tests=["test_e2e"],
min_test_count=3,
)
result = gate.check_test_strategy(strategy)
# Check regression
result = gate.check_regression({
"previous_passing": 50,
"current_passing": 50,
"current_total": 50,
})
# Run all checks at once
context = {
"coverage_metrics": metrics,
"test_strategy": strategy,
"regression_artifacts": {
"previous_passing": 50,
"current_passing": 55,
"current_total": 55,
"new_tests": 5,
},
}
results = gate.run_all_checks(context)
print(gate.overall_passed())
metrics = CoverageMetrics(
line_coverage=60,
branch_coverage=50,
function_coverage=60,
target_line=60,
target_branch=50,
target_function=60,
)
check_coverage(metrics: CoverageMetrics) -> GateResult - Check coverage against targetscheck_test_strategy(strategy: TestStrategy) -> GateResult - Check test strategy validitycheck_regression(artifacts: Dict) -> GateResult - Check for regressionsrun_all_checks(context: Dict) -> List[GateResult] - Run all enabled checksoverall_passed() -> bool - True if all recorded results passedclear() - Clear recorded results