Skip to content
TEA docs in plain text: llms-full.txt

Risk-Based Testing Explained

Testing depth scales with business impact. Use probability and impact to decide where failure needs the most coverage.

A payment failure and a cosmetic defect need different testing depth. Risk scores give the team a shared basis for that decision.

Ask three questions: how likely is this to fail, how bad is it if it does, and how much testing does that combination justify?

Probability (how likely to fail?)

  • 1 (Low): stable, well-tested, simple logic
  • 2 (Medium): moderate complexity, some unknowns
  • 3 (High): complex, untested, many edge cases

Impact (how bad if it fails?)

  • 1 (Low): minor inconvenience, few users affected
  • 2 (Medium): degraded experience, workarounds exist
  • 3 (High): critical path broken, business impact

The product is the risk score, from 1 to 9:

Impact
1 2 3
┌────┬────┬────┐
1 │ 1 │ 2 │ 3 │ Low risk
P 2 │ 2 │ 4 │ 6 │ Medium risk
r 3 │ 3 │ 6 │ 9 │ High risk
o └────┴────┴────┘
b Low Med High

TEA applies this in test-design. The bands below form the risk-governance release policy: which risks must be resolved before release.

ScoreLevelMitigationRelease policyActions
9CriticalMandatory, blocks releaseBlocks releaseComprehensive suite (E2E, API, security); multiple environments including a prod mirror; load and performance validation; security audit and penetration testing; monitoring and alerting; documented rollback; on-call rotation assigned. Resolve the critical risk before release.
6-8HighRequired, documented planNeeds a written planTargeted suite covering happy path plus critical errors; test environment set up; monitoring plan; mitigation and owners documented. Deploys with an approved plan.
4-5MediumRecommendedAdvisoryBasic coverage; standard monitoring; known limitations documented.
1-3LowOptionalNoneSmoke test if desired; feature flag for easy disable.
%%{init: {'theme':'base', 'themeVariables': { 'fontSize':'14px'}}}%%
flowchart TD
    Start([Risk Assessment]) --> Score{Risk Score?}

    Score -->|Score = 9| Critical[CRITICAL RISK<br/>Score: 9]
    Score -->|Score 6-8| High[HIGH RISK<br/>Score: 6-8]
    Score -->|Score 4-5| Medium[MEDIUM RISK<br/>Score: 4-5]
    Score -->|Score 1-3| Low[LOW RISK<br/>Score: 1-3]

    Critical --> Fail[RELEASE BLOCKED<br/>Resolve critical risk before release]

    High --> HasMit6{Mitigation<br/>Plan?}
    HasMit6 -->|Yes| Pass6[Release with<br/>approved plan]
    HasMit6 -->|No| Concerns6[Plan required<br/>before release]

    Medium --> Advisory[Advisory Only<br/>No release impact]
    Low --> NoAction[No Action<br/>Proceed]

    style Critical fill:#f44336,stroke:#b71c1c,stroke-width:3px,color:#fff
    style Fail fill:#d32f2f,stroke:#b71c1c,stroke-width:3px,color:#fff
    style High fill:#ff9800,stroke:#e65100,stroke-width:2px,color:#000
    style Concerns6 fill:#ffc107,stroke:#f57f17,stroke-width:2px,color:#000
    style Pass6 fill:#4caf50,stroke:#1b5e20,stroke-width:2px,color:#fff
    style Medium fill:#fff9c4,stroke:#f57f17,stroke-width:1px,color:#000
    style Low fill:#c8e6c9,stroke:#2e7d32,stroke-width:1px,color:#000
    style Advisory fill:#e8f5e9,stroke:#2e7d32,stroke-width:1px,color:#000
    style NoAction fill:#e8f5e9,stroke:#2e7d32,stroke-width:1px,color:#000

An open score-9 risk blocks release under this policy. A mitigation plan records the work needed to resolve it; writing the plan alone does not clear the block.

The trace gate decision is separate. It computes PASS, CONCERNS, or FAIL from requirement coverage, oracle confidence, and live evidence, and does not read the risk register. Full coverage can PASS while a score-9 risk is open, so review open risks and NFR evidence separately before release. See the gate rules. The trace skill reports human waivers separately and keeps its derived decision.

Every score at 6 or above needs a written mitigation with an owner and a date:

## Risk Mitigation
**Risk:** Payment integration failure (Score: 9)
**Mitigation Plan:**
- Create coverage for payment success, decline, retry, and duplicate submission
- Add payment sandbox environment
- Implement retry logic with idempotency
- Add monitoring and alerts
- Document rollback procedure
**Owner:** Backend team lead
**Deadline:** Before production deployment
**Status:** In progress

TEA scores across six categories, so a feature can be low-risk technically and high-risk on data integrity at the same time.

CategoryCoversExamplePIScoreConsequence
TECHTechnical debt, architecture fragilityMigrating REST to GraphQL339Extensive integration testing required
SECSecurity vulnerabilitiesAdding OAuth integration236Security testing mandatory
PERFPerformance degradationAdding real-time notifications224Load testing recommended
DATAData integrity and corruptionDatabase migration236Data validation tests required
BUSBusiness logic errorsDiscount calculation236Business logic tests mandatory
OPSOperational issuesLogging system update122Basic smoke test sufficient

Reading a score in context: payment processing scores 3 × 3 = 9, so it gets E2E coverage of every payment flow, API tests for every scenario, error handling for every failure mode, security testing on payment data, load testing, and production monitoring. A profile theme colour toggle scores 1 × 1 = 1, so it gets one E2E smoke test, no edge cases, and no API tests. Profile editing at 2 × 3 = 6 sits between: E2E for the happy path, API tests for CRUD, validation testing, and no low-value edge cases.

Risk scores, usage frequency, revenue exposure, and regulatory obligations inform priority.

PriorityTypical scoreOther factorsCoverage targetStarting test levelsExample
P06-9Critical revenue, security, data-integrity or compliance consequence with no safe workaround100%E2E + APILogin, checkout, payment
P14-6Core user journeys, complex logic, integration points90%API + selective E2EProfile editing, search, filters
P22-4Secondary features, admin functionality, reporting50%API happy path onlyExport features, advanced settings
P31-2Rarely used, nice-to-have, cosmetic20% (smoke test)E2E smoke test onlyTheme customization, experiments

The test levels are a starting point; test-design picks the cheapest level that can carry each risk. See Test Priorities Matrix for the complete criteria.

Ten equally-weighted profile tests become six weighted ones:

describe('User profile - Critical (P0)', () => {
test('should display name and email'); // Score 9: identity is critical
test('should allow editing name and email');
test('should validate email format');
test('should prevent unauthorized edits');
});
describe('User profile - High Value (P1)', () => {
test('should upload avatar'); // Score 6
test('should update bio');
});
// P2 theme preference: one smoke test
// P3 last-login display: one smoke test

Worked at project scale, on a checkout redesign from five steps to three with a 40-hour test budget:

ComponentPIScorePriorityTestingBudget
Payment processing339P015 E2E + 20 API tests20h (50%)
Order validation236P15 E2E + 10 API tests8h (20%)
Shipping calculation224P13 E2E + 8 API tests6h (15%)
Promo code validation224P12 E2E + 5 API tests4h (10%)
Gift message111P31 E2E smoke test2h (5%)

Splitting the same 40 hours evenly would give the gift message eight hours and payment eight hours, which is how payment bugs reach production alongside an immaculately tested gift message.

Use it on enterprise projects (high stakes, many features competing for effort), large codebases (exhaustive testing is off the table, resources are finite), and regulated industries (auditors want the risk assessment, and decisions must be justifiable).

Skip it on tiny projects with five features you can test exhaustively, and on throwaway prototypes. The scoring is overhead when there is nothing to prioritize.

Risk-based planning concentrates coverage on the highest priorities: 50 evenly spread tests become 70 concentrated on P0 and P1.

P3 still gets a smoke test. P2 adds the happy path, P1 adds error cases, P0 covers everything.

Re-score risks as evidence changes. A lower score needs evidence for a lower probability or impact.