STD: Delta CT Rule (DELTACT)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/rules/rule-delta-ct.mdRule Name: DELTA_CT Domain: RULES-DELTACT
Overview
This document specifies tests for the Delta CT rule using decision tables and test vectors. The rule evaluates CT value differences between configured target pairs within a well and flags observations that violate delta thresholds or have mismatched classifications.
Rule Characteristics:
- Pure business logic (no UI)
- Validates CT consistency between paired targets
- Classification mismatch detection
- IC target exclusion
- Bidirectional pair matching
Test Method: TM-API (per Test Plan - Rules use automated API tests)
Verification Approach: Rule verification is performed using data-driven test vectors. Each row in a decision table represents a complete verification scenario with defined inputs and expected outputs. This format enables exhaustive condition coverage while remaining concise and auditable.
Coverage Summary
| REQ ID | Title | Conditions | Test Vectors | Coverage | Gaps | Automation Status |
|---|---|---|---|---|---|---|
| REQ-RULES-DELTACT-001 | Validate CT Consistency Between Target Pairs | 16 | 24 | 100% | None | Automated |
Totals: 1 REQ, 16 Conditions, 24 Test Vectors, 100% Coverage
REQ-RULES-DELTACT-001: Validate CT Consistency Between Target Pairs
Input Variables
| Variable | Type | Valid Values | Description |
|---|---|---|---|
config.target_a | string | Target identifier | First target in configured pair |
config.target_b | string | Target identifier | Second target in configured pair |
config.threshold | float | > 0 | Maximum allowed CT difference |
obs_a.target | string | Target identifier | Observed target A |
obs_a.cls | string | Positive, Negative, Ambiguous, ... | Classification of observation A |
obs_a.ct | float? | null, NaN, numeric | CT value of observation A |
obs_a.is_ic | bool | true, false | Whether target A is Internal Control |
obs_b.target | string | Target identifier | Observed target B |
obs_b.cls | string | Positive, Negative, Ambiguous, ... | Classification of observation B |
obs_b.ct | float? | null, NaN, numeric | CT value of observation B |
obs_b.is_ic | bool | true, false | Whether target B is Internal Control |
Output Variables
| Variable | Type | Description |
|---|---|---|
error_raised | bool | Whether BAD_CT_DELTA error was raised |
error_code | string? | BAD_CT_DELTA or null |
validation_skipped | bool | Whether the pair was skipped (no validation performed) |
Decision Table: Pair Configuration Matching
Tests whether observed targets match a configured delta CT pair.
| TV | config | obs_targets | pair_matches | error_raised | Covers |
|---|---|---|---|---|---|
| TV-001-001 | (A, B, threshold=3) | [A, B] | true | depends on CT/CLS | AC: Configured pair matches |
| TV-001-002 | (A, B, threshold=3) | [B, C] | false | false | AC: Unconfigured pair - no validation |
| TV-001-003 | (A, B, threshold=3) | [C, D] | false | false | AC: Neither target in config |
Decision Table: Bidirectional Pair Matching
Tests that configuration (A, B) matches observations in either order.
| TV | config | obs_order | pair_matches | Covers |
|---|---|---|---|---|
| TV-001-004 | (A, B, threshold=3) | A first, B second | true | AC: Forward order match |
| TV-001-005 | (A, B, threshold=3) | B first, A second | true | AC: Reverse order match |
Decision Table: IC Target Exclusion
Tests that pairs containing Internal Control targets are skipped.
| TV | obs_a.is_ic | obs_b.is_ic | validation_skipped | error_raised | Covers |
|---|---|---|---|---|---|
| TV-001-006 | false | false | false | depends on CT/CLS | AC: Non-IC pair validated |
| TV-001-007 | true | false | true | false | AC: Target A is IC - skip |
| TV-001-008 | false | true | true | false | AC: Target B is IC - skip |
| TV-001-009 | true | true | true | false | AC: Both IC - skip |
Decision Table: CT Value Validity
Tests handling of null/invalid CT values.
| TV | obs_a.ct | obs_b.ct | validation_skipped | error_raised | Covers |
|---|---|---|---|---|---|
| TV-001-010 | 30 | 33 | false | depends on threshold | AC: Both valid - validate |
| TV-001-011 | null | 33 | true | false | AC: Target A CT null - skip |
| TV-001-012 | 30 | null | true | false | AC: Target B CT null - skip |
| TV-001-013 | null | null | true | false | AC: Both CT null - skip |
Decision Table: Delta Threshold Validation
Tests the >= operator for threshold comparison.
| TV | threshold | ct_a | ct_b | delta | error_raised | error_code | Covers |
|---|---|---|---|---|---|---|---|
| TV-001-014 | 3 | 30 | 32 | 2 | false | null | AC: Delta below threshold - no error |
| TV-001-015 | 3 | 30 | 33 | 3 | true | BAD_CT_DELTA | AC: Delta equals threshold - error |
| TV-001-016 | 3 | 30 | 34 | 4 | true | BAD_CT_DELTA | AC: Delta exceeds threshold - error |
| TV-001-017 | 3 | 33 | 30 | 3 | true | BAD_CT_DELTA | AC: Negative delta (absolute value) - error |
Decision Table: Classification Mismatch
Tests that different classifications trigger error regardless of CT values.
| TV | cls_a | cls_b | ct_delta | error_raised | error_code | Covers |
|---|---|---|---|---|---|---|
| TV-001-018 | Positive | Positive | 0 | false | null | AC: Same CLS, same CT - no error |
| TV-001-019 | Positive | Negative | 0 | true | BAD_CT_DELTA | AC: Different CLS - error |
| TV-001-020 | Negative | Positive | 0 | true | BAD_CT_DELTA | AC: Different CLS (reverse) - error |
Decision Table: Combined Conditions
Tests interaction between threshold and classification checks.
| TV | cls_a | cls_b | threshold | ct_a | ct_b | error_raised | reason | Covers |
|---|---|---|---|---|---|---|---|---|
| TV-001-021 | Positive | Positive | 3 | 30 | 32 | false | Same CLS, delta < threshold | AC: All conditions pass |
| TV-001-022 | Positive | Positive | 3 | 30 | 33 | true | Delta >= threshold | AC: CLS match but threshold violated |
| TV-001-023 | Positive | Negative | 3 | 30 | 30 | true | CLS mismatch | AC: CT pass but CLS violated |
| TV-001-024 | Positive | Negative | 3 | 30 | 35 | true | Both violated | AC: Both conditions violated |
Traceability to SRS Test Cases
| STD Vector | SRS Test Case | Description |
|---|---|---|
| TV-001-002, TV-001-003 | TC-DELTACT-001 | No error for unconfigured target pair |
| TV-001-015 | TC-DELTACT-002 | BAD_CT_DELTA when delta equals threshold |
| TV-001-016 | TC-DELTACT-003 | BAD_CT_DELTA when delta exceeds threshold |
| TV-001-019, TV-001-020 | TC-DELTACT-004 | BAD_CT_DELTA when classifications differ |
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|---|---|
| REQ-RULES-DELTACT-001 | BT-1209 | Existing |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|---|---|---|---|
| None | - | All acceptance criteria covered by test vectors | - | - |
Test Coverage Notes
- IC Exclusion (TV-001-006 through TV-001-009): Tests cover all combinations of IC status for target pairs
- Null CT Handling (TV-001-010 through TV-001-013): Tests cover all combinations of valid/null CT values
- Threshold Boundary (TV-001-014 through TV-001-017): Tests cover below, at, and above threshold including absolute value handling
- Classification Independence (TV-001-018 through TV-001-024): Tests verify CLS mismatch triggers independently of CT comparison