This prompt is designed for test architects and Senior Development Engineers in Test (SDETs) who need a repeatable, quantitative baseline of a test suite's overall health. The primary job-to-be-done is to generate a structured, scored assessment across multiple dimensions—such as redundancy, coverage efficiency, flakiness, and maintenance burden—before initiating a major consolidation sprint, conducting a quarterly engineering health review, or building an evidence-based business case to justify refactoring investment. It transforms a subjective feeling that 'the suite is bloated' into a defensible, dimension-specific score that can be tracked over time.
Prompt
Test Suite Health Scoring Rubric Prompt

When to Use This Prompt
Defines the ideal scenario, user, and prerequisites for applying the Test Suite Health Scoring Rubric, and clarifies when it should be avoided.
To use this prompt effectively, you must provide a representative sample of the test suite's structure and recent execution data. The required context includes a list of test case names with their functional descriptions, recent pass/fail histories to calculate flakiness, and ideally a mapping of tests to requirements or code coverage areas. The prompt is calibrated for suites with at least 50 test cases where manual review would be time-prohibitive. The output is not just a single score but a dimension breakdown with prioritized, actionable improvement recommendations. You should calibrate the scoring thresholds against your team's historical baselines before treating any absolute score as a definitive gate.
Do not use this prompt for real-time CI/CD gating or as a blocking check in a deployment pipeline; its strength is in strategic analysis, not millisecond-level pass/fail decisions. It is also unsuitable for small test suites with fewer than 50 cases, where a manual review by a senior engineer is faster and more contextually accurate. Avoid using this prompt on suites that lack any execution history, as the flakiness and maintenance burden dimensions require empirical pass/fail data to produce meaningful scores rather than speculative guesses.
Use Case Fit
Where this prompt works and where it does not.
Good Fit: Mature Test Suites
Use when: you have a large, established test suite with known maintenance pain and need a repeatable, multi-dimensional health score to prioritize optimization work. Guardrail: calibrate the rubric against your team's historical baselines before trusting absolute scores.
Bad Fit: Greenfield Projects
Avoid when: the test suite is new, small, or still in initial creation. A scoring rubric will produce misleadingly low or high scores without enough data. Guardrail: wait until you have at least 3-4 sprints of test execution history and maintenance activity before scoring.
Required Inputs
What you need: test case inventory, execution history (pass/fail/flaky rates), coverage maps, defect linkage data, and maintenance logs. Guardrail: missing execution history prevents flakiness scoring; missing coverage data prevents efficiency scoring. Document which dimensions are unscored due to data gaps.
Operational Risk
What to watch: teams may game the score by retiring tests that look redundant but cover untracked regressions. Guardrail: require a human review gate before any test retirement based on rubric output. Pair this prompt with the Redundant Test Case Identification prompt for evidence before action.
Calibration Dependency
What to watch: the rubric produces relative scores that are meaningless without team-specific thresholds for what counts as 'healthy.' Guardrail: run the rubric on a known-good and known-bad suite snapshot to set your organization's score ranges before using it for decisions.
Stakeholder Misinterpretation
What to watch: a single aggregate health score can hide critical dimension failures. A suite with excellent coverage but severe flakiness may look 'average.' Guardrail: always present dimension breakdowns alongside the aggregate score. Never use the aggregate alone for go/no-go decisions.
Copy-Ready Prompt Template
A copy-ready prompt for generating a scored test suite health assessment with dimension breakdowns and actionable improvement recommendations.
This prompt template produces a structured health score for a test suite by evaluating it across multiple dimensions: redundancy, coverage efficiency, flakiness, and maintenance burden. Replace the square-bracket placeholders with your suite's metadata, historical data, and calibration baselines. The output is a JSON rubric you can feed directly into a dashboard, a CI quality gate, or a stakeholder review packet.
textYou are a test suite health analyst. Evaluate the provided test suite data and produce a scored health assessment. ## INPUT DATA [TEST_SUITE_METADATA] [TEST_EXECUTION_LOGS] [FLAKINESS_HISTORY] [COVERAGE_REPORTS] [MAINTENANCE_TICKETS] ## SCORING DIMENSIONS Score each dimension from 0 (critical) to 100 (excellent). Use the team's calibration baselines where provided. 1. Redundancy: Degree of functionally duplicate or near-duplicate test cases. 2. Coverage Efficiency: Ratio of unique risk coverage to total test count. 3. Flakiness: Rate of non-deterministic failures over the last [TIME_PERIOD]. 4. Maintenance Burden: Effort spent on test upkeep relative to value delivered. ## CALIBRATION BASELINES [CALIBRATION_BASELINES] ## OUTPUT SCHEMA Return a single JSON object with this exact structure: { "overall_health_score": number (0-100), "dimension_scores": { "redundancy": { "score": number, "rationale": "string" }, "coverage_efficiency": { "score": number, "rationale": "string" }, "flakiness": { "score": number, "rationale": "string" }, "maintenance_burden": { "score": number, "rationale": "string" } }, "top_improvement_recommendations": [ { "action": "string", "dimension": "string", "expected_impact": "string", "effort_estimate": "low|medium|high" } ], "risk_notes": "string summarizing any data gaps or uncertainty in the assessment" } ## CONSTRAINTS - Do not invent data. If a dimension cannot be scored due to missing input, set the score to null and explain in the rationale. - Weight flakiness and coverage efficiency higher than redundancy and maintenance burden unless calibration baselines specify otherwise. - Recommendations must be specific and actionable, not generic advice. - If the overall health score is below [CRITICAL_THRESHOLD], include an explicit escalation flag in risk_notes.
Adaptation notes: Replace [TEST_SUITE_METADATA] with a structured summary of test count, types, and ownership. [TEST_EXECUTION_LOGS] should include pass/fail rates and durations over a representative window. [FLAKINESS_HISTORY] needs per-test flakiness counts or a flakiness dashboard export. [COVERAGE_REPORTS] should map tests to requirements, code paths, or risk items. [MAINTENANCE_TICKETS] can be a count or summary of test-related bug tickets and refactoring effort. [CALIBRATION_BASELINES] are your team's historical thresholds—for example, "flakiness above 5% is poor" or "redundancy below 10% is excellent." [TIME_PERIOD] should match your team's review cadence, such as "the last 4 weeks." [CRITICAL_THRESHOLD] is the score below which the suite needs immediate attention, typically 40-50 depending on your risk tolerance.
Before integrating this prompt into a CI pipeline or dashboard, run it against a known baseline suite where you already agree on the health assessment. Compare the model's scores and rationales to your team's manual evaluation. Calibrate the dimension weights and thresholds until the prompt produces assessments you would defend in a release readiness meeting. For regulated environments, always retain the full prompt input and output as an audit artifact, and require human sign-off on any retirement or consolidation actions recommended by the scoring rubric.
Prompt Variables
Required inputs for the Test Suite Health Scoring Rubric prompt. Each variable must be populated before execution to produce a calibrated, repeatable health score.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[TEST_SUITE_MANIFEST] | List of test cases with IDs, names, file paths, and execution history | src/tests/auth/login.spec.ts, src/tests/checkout/payment.cy.js | Parse check: must be a non-empty list of test identifiers. Each entry requires at least an ID and a path. |
[EXECUTION_LOGS] | Recent test run results including pass/fail, duration, and flaky markers | {"testId": "TC-401", "status": "flaky", "last_5_runs": ["pass", "fail", "pass", "pass", "fail"]} | Schema check: must include status, duration_ms, and last_n_runs array. Null allowed if no execution data exists for a test. |
[COVERAGE_MAP] | Mapping of test cases to requirements, code paths, or risk items they cover | {"TC-401": ["REQ-AUTH-12", "REQ-AUTH-13"], "TC-402": ["REQ-AUTH-12"]} | Schema check: must be a valid JSON object with test IDs as keys and arrays of coverage targets as values. Empty array allowed for untraceable tests. |
[DEFECT_HISTORY] | Historical defect data linked to test cases, including severity and detection date | {"TC-401": [{"defect_id": "BUG-891", "severity": "critical", "detected_by": true}]} | Schema check: must include defect_id and severity per entry. Null allowed if no defect history exists. Severity must be from allowed enum: critical, high, medium, low. |
[MAINTENANCE_LOG] | Records of test case changes, refactors, and maintenance effort over time | {"TC-401": {"last_modified": "2025-01-15", "change_count_90d": 4, "avg_fix_time_min": 30}} | Schema check: must include last_modified timestamp and change_count_90d integer. Null allowed for new tests without maintenance history. |
[DIMENSION_WEIGHTS] | Custom weight assignments for each health dimension in the scoring rubric | {"redundancy": 0.25, "coverage_efficiency": 0.25, "flakiness": 0.20, "maintenance_burden": 0.15, "defect_yield": 0.15} | Schema check: weights must sum to 1.0 within 0.01 tolerance. All five dimensions must be present. Each weight must be between 0.0 and 1.0. |
[BASELINE_THRESHOLDS] | Team-calibrated thresholds for classifying scores as healthy, warning, or critical | {"healthy": 0.80, "warning": 0.50, "critical_below": 0.50} | Schema check: healthy must be greater than warning. All values must be between 0.0 and 1.0. Thresholds must not overlap. |
[IMPROVEMENT_BUDGET] | Optional constraint on recommended improvements by effort estimate or count | {"max_effort_hours": 40, "max_recommendations": 10} | Schema check: must include at least one constraint field. Null allowed if no budget constraint is desired. Effort hours must be positive integer if provided. |
Implementation Harness Notes
How to wire the Test Suite Health Scoring Rubric Prompt into an application or workflow.
The Test Suite Health Scoring Rubric Prompt is designed to be integrated into a CI/CD pipeline or a scheduled analysis job, not run as a one-off chat. The prompt expects a structured [TEST_SUITE_METADATA] input containing raw metrics—execution times, pass/fail rates, flakiness scores, coverage data, and maintenance history—that your test infrastructure already collects. The model's job is to apply a consistent scoring rubric across dimensions like redundancy, coverage efficiency, flakiness, and maintenance burden, producing a scored assessment with dimension breakdowns and improvement recommendations. This means your implementation harness must gather, validate, and format the input data before calling the model, then validate and store the structured output afterward.
Wire the prompt into an application by building a pre-processing step that queries your test management system (e.g., TestRail, Zephyr) and CI logs (e.g., Jenkins, GitHub Actions) to populate the [TEST_SUITE_METADATA] fields. The harness should enforce schema validation on the input side—if required fields like flakiness_rate or coverage_percentage are missing or out of range, the job should fail fast with a clear error rather than sending incomplete data to the model. On the output side, parse the model's JSON response and validate it against the expected [OUTPUT_SCHEMA]: a top-level health_score (0-100), a dimension_breakdown array with per-dimension scores and rationales, and an improvement_recommendations array with prioritized actions. If the model returns malformed JSON or scores outside the 0-100 range, implement a retry loop with a maximum of two retries using a repair prompt that includes the validation error message. After two failures, log the raw output and escalate to a human reviewer rather than silently accepting a broken score.
For model choice, use a model with strong structured output capabilities and a context window large enough to hold the full [TEST_SUITE_METADATA] plus the rubric instructions. GPT-4o or Claude 3.5 Sonnet are appropriate defaults. Enable structured output mode if the provider supports it (e.g., OpenAI's response_format with a JSON schema) to reduce parsing failures. Log every scoring run—input metadata, raw model response, parsed scores, and any validation errors—to an observability system for trend analysis and prompt debugging. Avoid using this prompt for real-time gating decisions (e.g., blocking a deployment based on a single health score) without first calibrating the rubric against your team's historical baselines over multiple scoring cycles. The score is a diagnostic signal, not a release authority.
Expected Output Contract
Fields, types, and validation rules for the test suite health scoring rubric output. Use this contract to parse, validate, and integrate the model response into dashboards or CI gates.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
overall_health_score | number (0.0–100.0) | Must be a float between 0 and 100. Calculate as weighted average of dimension scores using weights in scoring_weights. | |
scoring_weights | object with dimension keys and number values | All values must sum to 1.0. Each key must match a dimension in dimension_breakdown. No extra or missing keys. | |
dimension_breakdown | array of dimension objects | Array length must equal number of keys in scoring_weights. Each object must include dimension_name, score, evidence_summary, and severity. | |
dimension_breakdown[].dimension_name | string from controlled enum | Must match one of: redundancy, coverage_efficiency, flakiness, maintenance_burden, execution_speed, defect_detection_rate. No duplicates across array. | |
dimension_breakdown[].score | number (0.0–100.0) | Must be a float between 0 and 100. Must be consistent with evidence_summary severity and improvement_recommendations priority. | |
dimension_breakdown[].evidence_summary | string (max 300 chars) | Must reference specific test cases, patterns, or metrics from [TEST_SUITE_CONTEXT]. No generic claims without grounding. | |
dimension_breakdown[].severity | string from controlled enum | Must be one of: critical, high, medium, low. Must align with score: critical maps to 0-25, high to 26-50, medium to 51-75, low to 76-100. | |
improvement_recommendations | array of recommendation objects | At least one recommendation per dimension with severity critical or high. Each object must include action, target_dimension, expected_impact, and effort_estimate. |
Common Failure Modes
When scoring test suite health, these failure modes surface most often in production. Each card explains what breaks and how to prevent it before the rubric reaches a stakeholder dashboard.
Calibration Drift Without Baselines
What to watch: The model assigns scores that look reasonable in isolation but drift from team norms over successive runs. Without a calibrated baseline, a '7/10 redundancy score' becomes meaningless. Guardrail: Provide a scored reference example in the prompt that anchors each dimension to a known suite state. Re-run the rubric against a golden baseline suite weekly and flag score drift exceeding 0.5 points on any dimension.
Coverage Efficiency Confusion
What to watch: The model conflates raw test count with coverage quality, rewarding suites that have many tests but low unique path coverage. This inflates health scores for bloated suites. Guardrail: Require the rubric to separate 'coverage breadth' from 'coverage efficiency' as distinct dimensions. Include a penalty rule: if test count grows faster than unique coverage paths over time, the efficiency score must decrease.
Flakiness Misattribution
What to watch: The model treats all test failures as equal, failing to distinguish environmental flakiness from genuine code defects when scoring the flakiness dimension. This produces overly punitive scores for suites with known infra instability. Guardrail: Supply recent CI execution logs with pass/fail patterns and environment metadata. Instruct the model to classify each failure as 'environmental,' 'timing-dependent,' or 'deterministic' before scoring, and weight deterministic failures higher.
Maintenance Burden Underestimation
What to watch: The model scores maintenance burden based only on test file size or line count, missing the real cost drivers: setup complexity, external dependency count, and change frequency. Guardrail: Include per-test metadata on dependency count, average setup time, and commit frequency over the last 90 days. Require the rubric to weight these factors above raw file size when scoring maintenance burden.
Recommendation Generality
What to watch: The improvement recommendations are vague ('reduce redundancy,' 'improve coverage') and cannot be actioned by the test team without further analysis. Guardrail: Constrain the output schema to require at least one specific, file-level recommendation per dimension scored below threshold. Each recommendation must reference a test file path, a concrete action, and the expected score improvement if completed.
Single-Run Score Overconfidence
What to watch: Stakeholders treat a single rubric run as ground truth, making retirement or investment decisions on one score without understanding variance. Guardrail: Require the prompt to produce a confidence interval per dimension score and a 'score stability' note. If the model cannot estimate variance from the provided data, it must flag the dimension as 'low confidence' and recommend a re-run with additional evidence before decisions are made.
Evaluation Rubric
Use this rubric to evaluate the quality of a Test Suite Health Scoring Rubric Prompt output before shipping it to a dashboard or stakeholder review. Each criterion targets a specific failure mode common in automated test suite analysis.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Dimension Coverage | Output includes a score and rationale for all required dimensions: redundancy, coverage efficiency, flakiness, and maintenance burden. | Missing one or more required dimensions in the scored breakdown. | Schema check: confirm each required dimension key exists in the output JSON and has a non-null score and rationale string. |
Score Calibration | Each dimension score falls within the defined [SCORE_RANGE] and aligns with the provided [BASELINE_DATA]. | Scores are outside the allowed range or contradict baseline metrics (e.g., scoring redundancy as low when duplication rate is high). | Range validation: assert min <= score <= max. Cross-reference each score against [BASELINE_DATA] metrics using a rule-based consistency check. |
Evidence Grounding | Every improvement recommendation cites a specific finding from the input data (e.g., a test case ID, a coverage path, a flaky failure log). | Recommendations are generic (e.g., 'reduce flaky tests') without linking to specific test cases or data points from [TEST_SUITE_ANALYSIS_INPUT]. | Citation check: parse recommendation text for test case IDs, file paths, or metric values present in the input. Flag recommendations with zero input-grounded references. |
Improvement Actionability | Each recommendation includes a concrete next action, an owner persona, and a suggested priority level. | Recommendations are vague (e.g., 'improve coverage') or lack clear ownership and priority. | Structure check: verify each recommendation object contains non-empty 'action', 'owner', and 'priority' fields. Reject if any field is missing or contains only generic verbs without specifics. |
Risk Awareness | The output flags any consolidation or retirement recommendation with a residual risk statement and a rollback condition. | Retirement or merge recommendations lack risk justification or suggest removal without acknowledging potential coverage gaps. | Risk check: for any recommendation with type 'retire' or 'merge', assert that 'residual_risk' and 'rollback_condition' fields are present and non-empty. |
Hallucination Resistance | All test case IDs, file paths, and metric values in the output exist in the provided [TEST_SUITE_ANALYSIS_INPUT]. | Output references test cases, files, or metrics not present in the input data. | Factual consistency check: extract all IDs and paths from the output. Validate each against the input dataset. Flag any fabricated references. |
Format Compliance | Output is valid JSON matching the [OUTPUT_SCHEMA] without extra or missing fields. | Output is malformed JSON, missing required top-level fields, or includes unsupported keys. | Schema validation: parse the output as JSON and validate against the [OUTPUT_SCHEMA] using a JSON Schema validator. Reject on parse failure or schema violation. |
Tone and Certainty | Language is appropriately hedged for uncertain findings (e.g., 'may indicate', 'suggests') and confident only when data strongly supports a conclusion. | Output uses absolute language (e.g., 'must retire', 'definitely redundant') without strong evidence, or hedges every statement including obvious findings. | Tone audit: sample 5 assertions from the output. Classify each as 'hedged' or 'absolute'. Flag if absolute assertions lack strong supporting evidence from the input, or if obvious high-confidence findings are overly hedged. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Add strict JSON schema validation for the scoring output. Include a calibration baseline section where the model compares current scores against historical team baselines. Add retry logic for schema violations and log score distributions for drift detection.
codeOutput must conform to [SCORING_SCHEMA]. Compare each dimension score against [BASELINE_VALUES]. Flag dimensions where score deviates > [THRESHOLD] from baseline. Include [EVIDENCE_COUNT] specific examples per dimension.
Watch for
- Schema drift when model changes versions
- Baseline staleness if not updated quarterly
- Missing evidence citations making scores unreproducible
- Score inflation over time without recalibration gates

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us