STD: Error Codes (ERRORCODES)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/errorcodes.mdDomain: ERRORCODES
Overview
This document specifies tests for the Error Codes domain, which covers generation, categorization, and assignment of error codes during run file processing and analysis.
Domain Characteristics:
- Primary function: Backend error code generation during rule execution and validation
- Secondary function: Blocking behavior for invalid files/data
- Configuration dependency: Error code entities in Kit Configuration (REQ-KITCFG-005)
- Rule integration: Error codes are outputs from analytical rules (Rules Engine)
Test Method Rationale: Per Test Plan §3.3, Rules and Backend Services domains use TM-API as primary method. Error code generation is pure deterministic backend logic triggered by rule execution or validation routines. All requirements can be verified via API by invoking rules/validation and checking assigned error codes. TM-MAN fallback for complex multi-rule scenarios requiring human verification.
Test Case Convention: Steps describe logical actions at the API/service level, not UI mechanics. Use "Execute the WG12S rule on a control sample" or "Parse a run file with invalid passive readings", not "Click the analyze button" or "Upload via the import dialog". This ensures test intent survives UI redesigns.
Coverage Summary
| REQ ID | Title | ACs | Tests | AC Coverage | Method | Gaps |
|---|---|---|---|---|---|---|
| REQ-ERRORCODES-001 | Generate Westgard Rule Error Codes | 9 | TC-ERRORCODES-001, TC-ERRORCODES-002 | 9/9 (100%) | TM-API | None |
| REQ-ERRORCODES-002 | Generate Control Check Error Codes | 10 | TC-ERRORCODES-003, TC-ERRORCODES-004 | 10/10 (100%) | TM-API | None |
| REQ-ERRORCODES-003 | Generate Inhibition Error Codes | 10 | TC-ERRORCODES-005, TC-ERRORCODES-006 | 10/10 (100%) | TM-API | None |
| REQ-ERRORCODES-004 | Generate Quantification Error Codes | 6 | TC-ERRORCODES-007 | 6/6 (100%) | TM-API | None |
| REQ-ERRORCODES-005 | Generate CT and Threshold Error Codes | 7 | TC-ERRORCODES-008 | 7/7 (100%) | TM-API | None |
| REQ-ERRORCODES-006 | Generate Classification Discrepancy Error Codes | 6 | TC-ERRORCODES-009 | 6/6 (100%) | TM-API | None |
| REQ-ERRORCODES-007 | Generate Bacteremia Error Codes | 6 | TC-ERRORCODES-010 | 6/6 (100%) | TM-API | None |
| REQ-ERRORCODES-008 | Generate Fluorescence Error Codes | 5 | TC-ERRORCODES-011 | 5/5 (100%) | TM-API | None |
| REQ-ERRORCODES-009 | Generate Miscellaneous Analytical Error Codes | 7 | TC-ERRORCODES-012, TC-ERRORCODES-013, TC-ERRORCODES-GAP-004A | 7/7 (100%) | TM-API | None |
| REQ-ERRORCODES-010 | Generate Parsing Validation Blocking Error Codes | 6 | TC-ERRORCODES-014, TC-ERRORCODES-015 | 6/6 (100%) | TM-API | None |
| REQ-ERRORCODES-011 | Generate Analysis Validation Blocking Error Codes | 14 | TC-ERRORCODES-016, TC-ERRORCODES-017, TC-ERRORCODES-018, TC-ERRORCODES-GAP-006A, TC-ERRORCODES-GAP-006B | 14/14 (100%) | TM-API | None |
| REQ-ERRORCODES-012 | IC_MAPPED_BUT_NO_IC_TARGET Error Code Availability | 2 | TC-ERRORCODES-019 | 2/2 (100%) | TM-API | None |
| REQ-ERRORCODES-013 | Raise IC_MAPPED_BUT_NO_IC_TARGET on Missing IC Target Observation | 2 | TC-ERRORCODES-020 | 2/2 (100%) | TM-API | None |
Totals: 13 REQs, 90 ACs, 20 Test Cases, 100% Coverage
Test Cases
TC-ERRORCODES-001: Westgard rule error codes at well and target levels
Verifies: REQ-ERRORCODES-001 (AC1: dual-level codes, AC2: direction indication)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with Westgard limits configured for test mix
- Control sample wells with known CT values relative to configured mean/SD
Test Data:
- Control sample with CT value > mean + 2*SD (triggers WG12S_HIGH)
- Control sample with CT value < mean - 3*SD (triggers WG13S_LOW)
- Control sample with 7 consecutive values above mean (triggers WG7T_HIGH)
Steps:
- Create a run file with control samples having above test data CT values
- Execute analysis including Westgard rules
- Query error codes assigned to each well and target
Expected Results:
- AC1: Each Westgard violation produces error codes at both well level (_WELL suffix) and target level (_TARGET suffix)
- AC2: Error codes indicate direction with HIGH or LOW suffix
- WG12S_HIGH_WELL and WG12S_HIGH_TARGET assigned for >2SD condition
- WG13S_LOW_WELL and WG13S_LOW_TARGET assigned for <3SD condition
- WG7T_HIGH_WELL and WG7T_HIGH_TARGET assigned for 7T trend condition
Automation Status: Automated (BT-9754 - WG12S direction suffix at target level)
Jira: [Pending]
TC-ERRORCODES-002: Westgard combined rules and missing limits
Verifies: REQ-ERRORCODES-001 (AC3: WESTGARDS_MISSED, AC4-AC9: all Westgard rule code families)
Method: TM-API
Priority: High
Preconditions:
- One mix with Westgard limits configured
- One mix without Westgard limits configured
Test Data:
- Control samples for all Westgard rule types (WG12S, WG13S, WG14S, WG22S, WG7T, WG7T13S, WG13S22S, WGInError)
Steps:
- Process control sample on mix without Westgard limits
- Verify WESTGARDS_MISSED is generated
- Process control samples triggering each Westgard rule type
- Verify appropriate error codes generated for each rule
Expected Results:
- AC3: WESTGARDS_MISSED generated when Westgard limits not configured for mix
- AC4: WG7T_HIGH/LOW codes generated for 7T rule violations
- AC5: WG12S_HIGH/LOW codes generated for 1:2s rule violations
- AC6: WG13S_HIGH/LOW codes generated for 1:3s rule violations
- AC7: WG14S_HIGH/LOW codes generated for 1:4s rule violations
- AC8: WG22S_HIGH/LOW codes generated for 2:2s rule violations
- AC9: Combined rule codes (WG7T13S, WG22S13S) and WG_IN_ERROR codes generated appropriately
Automation Status: Automated
Jira: [Pending]
TC-ERRORCODES-003: Positive and negative control failure codes
Verifies: REQ-ERRORCODES-002 (AC1: positive control failures, AC2: negative control failures, AC3: out-of-range)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with positive and negative control definitions
- Control limits configured for control samples
Test Data:
- Positive control sample with unexpected negative result
- Negative control sample with unexpected positive result
- Control sample with CT value above/below configured range
Steps:
- Process positive control sample that fails expected behavior
- Verify FAILED_POS_WELL and FAILED_POS_TARGET assigned
- Process negative control sample that fails expected behavior
- Verify NEC_FAILURE_WELL/TARGET and NEGATIVE_FAILURE_WELL/TARGET assigned
- Process control sample with out-of-range CT value
- Verify CONTROL_OUT_OF_RANGE_HIGH/LOW codes assigned
Expected Results:
- AC1: FAILED_POS_WELL and FAILED_POS_TARGET generated for positive control failure
- AC2: NEC_FAILURE and NEGATIVE_FAILURE codes generated for negative control failure
- AC3: CONTROL_OUT_OF_RANGE_HIGH/LOW codes generated with directional suffix
Automation Status: Automated
Jira: [Pending]
TC-ERRORCODES-004: Control validation codes - crossover, missing, limits
Verifies: REQ-ERRORCODES-002 (AC4: crossover failure, AC5: missing controls, AC6: missing limits, AC7-AC10: specific rule codes)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with cross-over control validation enabled
- Configuration requiring minimum control count
Test Data:
- Run with cross-over control failure condition
- Run with fewer than required controls
- Run with missing extraction controls
- Mix without control limits configured
Steps:
- Process run with cross-over control failure
- Verify CROSS_CNTRL_FAIL_WELL and CROSS_CNTRL_FAIL_MIX assigned
- Process run with missing controls
- Verify CONTROL_MISSING and/or EXTRACTION_CONTROLS_MISSING assigned
- Process control on mix without limits
- Verify CC_LIMITS_MISSED assigned
Expected Results:
- AC4: CROSS_CNTRL_FAIL codes generated at well and mix levels
- AC5: CONTROL_MISSING or EXTRACTION_CONTROLS_MISSING generated for missing controls
- AC6: CC_LIMITS_MISSED generated when control limits not configured
- AC7-AC10: Specific BCC, BNC, BPEC, WCAF, MIN_CONTROLS, MINEXTRACT rule codes generated as documented
Automation Status: Automated
Jira: [Pending]
TC-ERRORCODES-005: Patient inhibition and qualitative IC codes
Verifies: REQ-ERRORCODES-003 (AC1: patient inhibition, AC2: ICQUAL codes, AC4: serum variants)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with internal control (IC) targets defined
- IC inhibition thresholds configured
Test Data:
- Patient sample with internal control failure indicating inhibition
- Sample triggering ICQUAL rule variants (RPT, FIRST_RUN, INHN)
- Serum sample triggering PICQUAL_SERUM rule
Steps:
- Process patient sample with IC failure
- Verify INH_WELL and IC_FAILED assigned
- Process samples triggering PICQUAL rule variants
- Verify ICQUAL_RPT, ICQUAL_FIRST_RUN codes as appropriate
- Process serum sample triggering PICQUAL_SERUM
- Verify ICQUAL_INHN generated
Expected Results:
- AC1: INH_WELL and IC_FAILED generated for patient sample inhibition
- AC2: ICQUAL codes (RPT, FIRST_RUN) generated for qualitative IC inhibition
- AC4: Serum-specific ICQUAL_INHN generated for PICQUAL_SERUM rule
Automation Status: Automated (BT-9755 - IC CT above threshold triggers inhibition outcome)
Jira: [Pending]
TC-ERRORCODES-006: Quantitative IC and systemic inhibition codes
Verifies: REQ-ERRORCODES-003 (AC3: ICQUANT codes, AC5: systemic inhibition, AC6: batch IC codes, AC7-AC10: specific rule codes)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with quantitative IC analysis enabled
- Systemic inhibition detection enabled
Test Data:
- Sample triggering PICQUANT rule (INHN, INHP, FIRST_RUN variants)
- Run with systemic inhibition condition
- Batch with IC qualitative failure
Steps:
- Process samples triggering PICQUANT rule variants
- Verify ICQUANT_INHN, ICQUANT_INHP, ICQUANT_FIRST_RUN codes
- Process run with systemic inhibition
- Verify SYSTEMIC_INHIBITION_DETECTED assigned
- Process batch with IC qualitative failure
- Verify BICQUAL_WELL, BICQUAL_TARGET assigned
Expected Results:
- AC3: ICQUANT codes (INHN, INHP, FIRST_RUN) generated for quantitative IC inhibition
- AC5: SYSTEMIC_INHIBITION_DETECTED generated for systemic inhibition
- AC6: BICQUAL_WELL and BICQUAL_TARGET generated for batch IC qualitative failure
- AC7-AC10: All INH, BICQUAL, BIC, PICQUAL, PICQUANT, SYSTEMIC_INHIBITION rule codes generated as documented
Automation Status: Automated (BT-9758 - Systemic inhibition fires on >=3 inhibited wells)
Jira: [Pending]
TC-ERRORCODES-007: Quantification error codes
Verifies: REQ-ERRORCODES-004 (AC1-AC6: all quantification error codes)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with quantification rules enabled
- Standard curve configuration for quantification
Test Data:
- Sample with CT above configured cutoff
- Mix without quantification limits configured
- Run missing quantification standards
- Run with standard curve failures (bad R2, bad gradient, bad efficiency)
- Sample unable to quantify
Steps:
- Process sample with CT above cutoff
- Verify CT_ABOVE_CUTOFF assigned
- Process sample on mix without quant limits
- Verify RQUANT_LIMITS_MISSED assigned
- Process run missing quant standards
- Verify QUANT_STANDARDS_MISSING assigned
- Process run with standard curve failures
- Verify INSUFFICIENT_STANDARD_CONTROLS, BAD_R2, BAD_GRADIENT, BAD_EFFICIENCY as appropriate
- Process sample that cannot be quantified
- Verify UNABLE_TO_QUANTIFY assigned
Expected Results:
- AC1: CT_ABOVE_CUTOFF generated when CT exceeds cutoff
- AC2: RQUANT_LIMITS_MISSED generated when quantification limits not configured
- AC3: QUANT_STANDARDS_MISSING generated when standards missing
- AC4: QUANT_VALIDATION codes (INSUFFICIENT_STANDARD_CONTROLS, BAD_R2, BAD_GRADIENT, BAD_EFFICIENCY, STANDARD_WITHOUT_QUANT, STANDARD_OUTSIDE_CT_RANGE) generated for validation failures
- AC5: UNABLE_TO_QUANTIFY generated for unable-to-quantify conditions
- AC6: RQUANTASQUAL rule produces outcomes only without specific error codes
Automation Status: Automated (BT-9761 - BAD_EFFICIENCY validation failure)
Jira: [Pending]
TC-ERRORCODES-008: CT and threshold error codes
Verifies: REQ-ERRORCODES-005 (AC1-AC7: all CT/threshold error codes)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with CT adjustment rules enabled
- Threshold configuration for targets
Test Data:
- Sample requiring CT adjustment per configured rules
- Mix without adjustment limits configured
- Sample with incorrect threshold configuration
- Sample with indeterminate CT values
- Sample with CT delta violation
- Zika-specific sample requiring adjustment
Steps:
- Process sample triggering CT adjustment
- Verify ADJ_CT assigned
- Process sample on mix without adjustment limits
- Verify ADJ_LIMITS_MISSED assigned
- Process sample with threshold configuration issues
- Verify THRESHOLD_WRONG or THRESHOLD_MISSED assigned
- Process sample with indeterminate CTs
- Verify INDETERMINATE_CTS assigned
- Process sample with CT delta violation
- Verify BAD_CT_DELTA assigned
- Process Zika sample triggering adjustment
- Verify ZIKA_ADJ_CT and/or ZIKA_ADJ_LIMITS_MISSED assigned
Expected Results:
- AC1: ADJ_CT generated when CT adjustment applied
- AC2: ADJ_LIMITS_MISSED generated when adjustment limits not configured
- AC3: THRESHOLD_WRONG or THRESHOLD_MISSED generated for threshold issues
- AC4: INDETERMINATE_CTS generated for indeterminate CT values
- AC5: BAD_CT_DELTA generated for CT delta violations
- AC6: ZIKA_ADJ_CT and ZIKA_ADJ_LIMITS_MISSED generated for Zika adjustments
- AC7: ICCT rule produces outcomes only without specific error codes
Automation Status: Automated (BT-9756 - THRESHOLD_WRONG and THRESHOLD_MISSED)
Jira: [Pending]
TC-ERRORCODES-009: Classification discrepancy error codes
Verifies: REQ-ERRORCODES-006 (AC1-AC6: all classification discrepancy error codes)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with classification rules enabled
- Discrepancy detection rules configured
Test Data:
- Well with target classifications that disagree
- Control sample with classification discrepancy
- Sample with CT discrepancy
- Control sample with CT discrepancy
- Sample with missing cutoff limits
- Sample with replication quality issues
Steps:
- Process well with classification discrepancy
- Verify CLSDISC_WELL assigned
- Process control with classification discrepancy
- Verify CONTROL_CLSDISC_WELL and CONTROL_CLSDISC_TARGET assigned
- Process sample with CT discrepancy
- Verify CTDISC_WELL assigned
- Process control with CT discrepancy
- Verify CONTROL_CTDISC_WELL and CONTROL_CTDISC_TARGET assigned
- Process sample with missing cutoff limits
- Verify CUTOFF_LIMITS_MISSED assigned
- Process sample with replication quality issues
- Verify RQ_CLS and/or RQ_LOG assigned
Expected Results:
- AC1: CLSDISC_WELL generated for well classification discrepancies
- AC2: CONTROL_CLSDISC codes generated for control classification discrepancies
- AC3: CTDISC_WELL generated for CT discrepancies
- AC4: CONTROL_CTDISC codes generated for control CT discrepancies
- AC5: CUTOFF_LIMITS_MISSED generated for missing cutoff limits
- AC6: RQ_CLS and RQ_LOG generated for replication quality issues
Automation Status: Automated (BT-9757 - CLS discrepancy and CT discrepancy)
Jira: [Pending]
TC-ERRORCODES-010: Bacteremia error codes
Verifies: REQ-ERRORCODES-007 (AC1-AC6: all bacteremia error codes)
Method: TM-API
Priority: Medium
Preconditions:
- Kit configuration with bacteremia analysis enabled
- Bacterial control matching configured
Test Data:
- Patient sample requiring bacterial control matching with no match found
- Patient sample matching invalid bacterial control
- Sample with low bacterial load
- Negative patient with low bacterial load
- Quantitative patient with low bacterial load
- Sample with tissue and HTLV combination issue
Steps:
- Process patient sample with no bacterial match
- Verify BACT_NO_MATCHING_SAMPLE and/or PATIENT_HAS_NO_BACT_MATCH assigned
- Process patient matching invalid bacterial control
- Verify PATIENT_MATCHES_INVALID_BACT assigned
- Process sample with low bacterial load
- Verify LOW_BACT assigned
- Process negative patient with low bacterial load
- Verify NEG_PATIENT_HAS_LOW_BACT_SUSPECTED or CONFIRMED assigned
- Process quantitative patient with low bacterial load
- Verify QUANT_PATIENT_HAS_LOW_BACT_SUSPECTED or CONFIRMED assigned
- Process sample with tissue and HTLV combination
- Verify BACT_TISSUE_AND_HTLV assigned
Expected Results:
- AC1: BACT_NO_MATCHING_SAMPLE generated for missing bacterial matches
- AC2: PATIENT_MATCHES_INVALID_BACT generated for invalid matches
- AC3: LOW_BACT generated for low bacterial load conditions
- AC4: NEG_PATIENT_HAS_LOW_BACT codes generated for negative patients
- AC5: QUANT_PATIENT_HAS_LOW_BACT codes generated for quantitative patients
- AC6: BACT_TISSUE_AND_HTLV generated for tissue/HTLV combination issues
Automation Status: Not Implemented (BT-9764 @KNOWN_LIMITATION - requires specialized BACT config)
Jira: [Pending]
TC-ERRORCODES-011: Fluorescence error codes
Verifies: REQ-ERRORCODES-008 (AC1-AC5: all fluorescence error codes)
Method: TM-API
Priority: Medium
Preconditions:
- Kit configuration with fluorescence analysis rules enabled
- Maximum and minimum fluorescence limits configured
Test Data:
- Sample with unexpected fluorescence in a channel
- Sample exceeding maximum fluorescence limit
- Sample below minimum fluorescence limit
- Sample with incorrect sigmoid curve shape
Steps:
- Process sample with unexpected fluorescence
- Verify UNEXPECTED_FL assigned
- Process sample exceeding maximum fluorescence
- Verify MAXIMUM_FLUORESCENCE_MISSED assigned
- Process sample below minimum fluorescence
- Verify LOW_FLUORESCENCE_TARGET, LOW_FLUORESCENCE_WELL, and/or MINIMUM_FLUORESCENCE_MISSED assigned
- Process sample with incorrect sigmoid curve
- Verify INCORRECT_SIGMOID assigned
Expected Results:
- AC1: UNEXPECTED_FL generated for unexpected fluorescence
- AC2: MAXIMUM_FLUORESCENCE_MISSED generated when exceeding maximum
- AC3: LOW_FLUORESCENCE codes generated for low fluorescence
- AC4: MINIMUM_FLUORESCENCE_MISSED generated when below minimum
- AC5: INCORRECT_SIGMOID generated for incorrect sigmoid curves
Automation Status: Automated
Jira: [Pending]
TC-ERRORCODES-012: Miscellaneous analytical error codes - conditions
Verifies: REQ-ERRORCODES-009 (AC1-AC5: ambiguous, inconclusive, inherited, manual baseline, tissue weight)
Method: TM-API
Priority: Medium
Preconditions:
- Kit configuration with miscellaneous analytical rules enabled
Test Data:
- Well with ambiguous classification
- Well with inconclusive result
- Well with inherited control/extraction failure
- Well requiring manual baseline check
- Well with invalid tissue weight
Steps:
- Process well with ambiguous classification
- Verify AMB_WELL assigned
- Process well with inconclusive result
- Verify INCONCLUSIVE_WELL assigned
- Process well with inherited failure
- Verify INHERITED_CONTROL_FAILURE and/or INHERITED_EXTRACTION_FAILURE assigned
- Process well requiring manual baseline check
- Verify MANUAL_BASELINE_CHECK_WELL and/or MANUAL_BASELINE_CHECK_TARGET assigned
- Process well with invalid tissue weight
- Verify INVALID_TISSUE_WEIGHT assigned
Expected Results:
- AC1: AMB_WELL generated for ambiguous wells
- AC2: INCONCLUSIVE_WELL generated for inconclusive results
- AC3: INHERITED_CONTROL_FAILURE and INHERITED_EXTRACTION_FAILURE generated for inherited failures
- AC4: MANUAL_BASELINE_CHECK codes generated for manual baseline check conditions
- AC5: INVALID_TISSUE_WEIGHT generated for invalid tissue weight
Automation Status: Automated (BT-9762 - AMB_WELL and INCONCLUSIVE_WELL)
Jira: [Pending]
TC-ERRORCODES-013: Combined mixes and outcome-only rules
Verifies: REQ-ERRORCODES-009 (AC6: combined mixes missing, AC7: outcome-only rules)
Method: TM-API
Priority: Medium
Preconditions:
- Kit configuration with combined mixes enabled
- Rules that produce outcomes only (no error codes)
Test Data:
- Run with combined mixes but missing wells
- Samples triggering COMBINED_OUTCOME, LIMS_EXPORT, RRESOLUTION, RWAC, GAPDH_ENT rules
Steps:
- Process run with combined mixes missing wells
- Verify COMBINED_MIXES_WELLS_MISSING assigned
- Process samples triggering each outcome-only rule
- Verify no specific error codes generated (outcomes only)
Expected Results:
- AC6: COMBINED_MIXES_WELLS_MISSING generated when combined mixes have missing wells
- AC7: COMBINED_OUTCOME, LIMS_EXPORT, RRESOLUTION, RWAC, GAPDH_ENT rules produce outcomes only without generating specific error codes
Automation Status: Automated (BT-9763 - COMBINED_MIXES_WELLS_MISSING on NOR2-only run)
Jira: [Pending]
TC-ERRORCODES-014: Parsing validation blocking - file structure
Verifies: REQ-ERRORCODES-010 (AC1: passive readings, AC2: thermocycler, AC3: filename)
Method: TM-API
Priority: Critical
Preconditions:
- Import endpoint accessible
- Various malformed run files prepared
Test Data:
- Run file with mismatched passive/non-passive observation counts
- Run file missing thermocycler JSON field
- Run file with invalid file name (when using file name import approach)
Steps:
- Attempt to parse run file with mismatched passive observation count
- Verify INVALID_PASSIVE_READINGS generated
- Attempt to parse run file missing thermocycler field
- Verify THERMOCYCLER_UNKNOWN generated
- Attempt to import run file with invalid filename
- Verify INVALID_FILENAME generated
Expected Results:
- AC1: INVALID_PASSIVE_READINGS generated for passive observation count mismatch
- AC2: THERMOCYCLER_UNKNOWN generated when thermocycler JSON field missing
- AC3: INVALID_FILENAME generated for invalid run file names
Automation Status: Not Implemented (BT-9765 @KNOWN_LIMITATION - parsing codes require instrument import path, not Behat JSON upload)
Jira: [Pending]
TC-ERRORCODES-015: Parsing blocking behavior
Verifies: REQ-ERRORCODES-010 (AC4: prevents rule processing, AC5: prevents history, AC6: prevents export)
Method: TM-API
Priority: Critical
Preconditions:
- Run file with blocking parsing error imported
Test Data:
- Run file triggering INVALID_PASSIVE_READINGS (blocking error)
Steps:
- Import run file with blocking parsing error
- Attempt to trigger rule processing
- Verify rule processing is blocked
- Attempt to include in history aggregation
- Verify history inclusion is blocked
- Attempt to export
- Verify export is blocked
Expected Results:
- AC4: Blocking errors prevent rule processing until resolved
- AC5: Blocking errors prevent history inclusion until resolved
- AC6: Blocking errors prevent export until resolved
Automation Status: Not Implemented (BT-9765 @KNOWN_LIMITATION - parsing codes require instrument import path, not Behat JSON upload)
Jira: [Pending]
TC-ERRORCODES-016: Analysis validation - sample label and reference data
Verifies: REQ-ERRORCODES-011 (AC1-AC4: sample label validation, AC5-AC9: reference data validation)
Method: TM-API
Priority: Critical
Preconditions:
- Run file ready for analysis
- Valid and invalid sample labels prepared
- Reference data (mixes, testcodes, roles) in configuration
Test Data:
- Well with valid label: "|A:123|T:456|"
- Well with invalid label: "Invalid!Label@Format"
- Well referencing non-existent mix
- Well referencing unknown testcode
- Well with testcode-mix mismatch
- Well with unknown role-to-target mapping
- Well missing testcode
Steps:
- Process well with valid label format
- Verify no SAMPLE_LABEL_IS_BAD error
- Process well with invalid label format
- Verify SAMPLE_LABEL_IS_BAD generated
- Process well referencing unknown mix
- Verify UNKNOWN_MIX generated
- Process well referencing unknown testcode
- Verify UNKNOWN_TESTCODE generated
- Process well with testcode-mix mismatch
- Verify MIX_DIDNT_MATCH_TC generated
- Process well with unknown role-to-target mapping
- Verify UNKNOWN_ROLE generated
- Process well missing testcode
- Verify TESTCODE_MISSING generated
Expected Results:
- AC1: SAMPLE_LABEL_IS_BAD generated for invalid sample label structure
- AC2: Valid label format: |tag:value| with valid tag characters (A, C, D, E, T, R, N, X, Y, W)
- AC3: Valid label value characters: words, numbers, spaces, dashes, dots
- AC5: UNKNOWN_MIX generated for unknown mix references
- AC6: UNKNOWN_TESTCODE generated for unknown testcode references
- AC7: MIX_DIDNT_MATCH_TC generated for testcode-mix mismatches
- AC8: UNKNOWN_ROLE generated for unknown role-to-target mappings
- AC9: TESTCODE_MISSING generated for missing testcodes
Automation Status: Automated
Jira: [Pending]
TC-ERRORCODES-017: Analysis validation - extraction and control/accession
Verifies: REQ-ERRORCODES-011 (AC10: extraction validation, AC11: control/accession validation, AC12: statistical validation)
Method: TM-API
Priority: Critical
Preconditions:
- Run file ready for analysis
- Various extraction date and instrument configurations
Test Data:
- Well with future extraction date
- Well with invalid extraction date format
- Well missing extraction date
- Well with unknown extraction instrument
- Well missing extraction instrument
- Well with missing/invalid extraction batch
- Control well with accession number
- Patient well missing accession
- Patient well with invalid accession format
- Well with invalid standard deviation for Westgard
Steps:
- Process well with future extraction date
- Verify INVALID_EXTRACTION_DATE generated
- Process well missing extraction date
- Verify EXTRACTION_DATE_MISSING generated
- Process well with unknown extraction instrument
- Verify EXTRACTION_INSTRUMENT_UNKNOWN_WELL generated
- Process well missing extraction instrument
- Verify EXTRACTION_INSTRUMENT_MISSING generated
- Process well with missing/invalid extraction batch
- Verify EXTRACTION_BATCH_MISSING or INVALID_EXTRACTION_BATCH generated
- Process control well with accession
- Verify CNTRL_HAS_ACS generated
- Process patient well missing/invalid accession
- Verify ACCESSION_MISSING or INVALID_ACCESSION generated
- Process well with invalid SD for Westgard
- Verify INVALID_SD generated
Expected Results:
- AC10: INVALID_EXTRACTION_DATE generated for future/invalid dates; EXTRACTION_DATE_MISSING for missing dates; EXTRACTION_INSTRUMENT_UNKNOWN_WELL/EXTRACTION_INSTRUMENT_MISSING for instrument issues; EXTRACTION_BATCH_MISSING/INVALID_EXTRACTION_BATCH for batch issues
- AC11: CNTRL_HAS_ACS generated for controls with accessions; ACCESSION_MISSING/INVALID_ACCESSION for patient accession issues
- AC12: INVALID_SD generated for invalid standard deviation
Automation Status: Automated
Jira: [Pending]
TC-ERRORCODES-018: Analysis blocking behavior
Verifies: REQ-ERRORCODES-011 (AC13: blocking behavior, AC14: error handling)
Method: TM-API
Priority: Critical
Preconditions:
- Well with blocking analysis error
Test Data:
- Well triggering UNKNOWN_MIX blocking error
Steps:
- Import run file with well having analysis blocking error
- Verify well receives blocking error code
- Attempt to process rules on blocked well
- Verify rule processing is blocked for affected well
- Attempt to include blocked well in history
- Verify history inclusion is blocked
- Attempt to export blocked well
- Verify export is blocked
Expected Results:
- AC13: Blocking errors prevent rule processing, history inclusion, and export until resolved
- AC14: System prevents further processing of affected well until correction
Automation Status: Automated (BT-9760 - blocking error edit-and-resolve pattern)
Jira: [Pending]
TC-ERRORCODES-019: IC_MAPPED_BUT_NO_IC_TARGET error code entity and export @V3_1_0
Verifies: REQ-ERRORCODES-012 (AC1: error code properties, AC2: export behavior)
Method: TM-API
Priority: High
Preconditions:
- Site with v3.1.0 migration applied (IC_MAPPED_BUT_NO_IC_TARGET error code seeded)
- Kit configuration with Error Codes sheet exportable
Test Data:
- Site with IC_MAPPED_BUT_NO_IC_TARGET error code present in the error_codes table
Steps:
- Query the Error Codes configuration for the site via API
- Verify IC_MAPPED_BUT_NO_IC_TARGET exists with correct properties
- Export the Error Codes configuration sheet
- Verify IC_MAPPED_BUT_NO_IC_TARGET appears as a row in the export
Expected Results:
- AC1: IC_MAPPED_BUT_NO_IC_TARGET error code exists with level=Well, type=Error, does_prevent_analyse=true, and a descriptive message indicating an IC mapping exists but no IC target observation was found
- AC2: The Error Codes sheet export contains a row for IC_MAPPED_BUT_NO_IC_TARGET with the configured message and flags
Automation Status: Not Implemented
Jira: [Pending]
TC-ERRORCODES-020: IC_MAPPED_BUT_NO_IC_TARGET raised on missing IC target observation @V3_1_0
Verifies: REQ-ERRORCODES-013 (AC1: detection logic, AC2: downstream effects)
Method: TM-API
Priority: High
Preconditions:
- Kit configuration with a control label mapped as IC for a mix
- IC target defined in the mix role-to-target mapping
- Run file JSON fixture where the IC target observation is absent for the IC-mapped mix
Test Data:
- Run file with patient/control wells for an IC-mapped mix, but no IC target observation present
- Comparison run file with IC target observation present (negative control case)
Steps:
- Import kit configuration with IC mapping for a mix (control label mapped as IC)
- Import a run file where the IC-mapped mix has no IC target observation
- Trigger analysis via API
- Query the well error codes via API
- Verify IC_MAPPED_BUT_NO_IC_TARGET is assigned to the well
- Verify NEG_IC control rule mappings are not applied to the affected well
- Verify the error code appears in the run result export
- Import a run file where the IC target observation is present
- Trigger analysis via API
- Verify IC_MAPPED_BUT_NO_IC_TARGET is NOT assigned
Expected Results:
- AC1: When a control label is IC-mapped for a mix and the imported run does not contain an IC target observation for that mix, the well receives IC_MAPPED_BUT_NO_IC_TARGET error code; the BicqualRule detects the missing IC observation before further IC inhibition checks
- AC2: NEG_IC control rule mappings are not applied to the affected well; the error code appears in downstream exports and views that surface error codes; when the IC observation is present, the error is not raised
Automation Status: Not Implemented
Jira: [Pending]
Supplementary Gap-Fill Tests
| TC | Description | Covers |
|---|---|---|
| TC-ERRORCODES-GAP-004A | Negative tissue_weight triggers INVALID_TISSUE_WEIGHT | REQ-ERRORCODES-009 AC5 |
| TC-ERRORCODES-GAP-006A | Label without pipe separators triggers SAMPLE_LABEL_IS_BAD | REQ-ERRORCODES-011 AC1 |
| TC-ERRORCODES-GAP-006B | Label with unknown tag Z triggers SAMPLE_LABEL_IS_BAD | REQ-ERRORCODES-011 AC2 |
Gap Analysis
No gaps identified. All 90 acceptance criteria have test coverage.
Coverage by AC Type
| AC Category | Count | Covered | Notes |
|---|---|---|---|
| Westgard QC codes | 9 | 9 | Verified via TM-API with control sample data |
| Control validation codes | 10 | 10 | Verified via TM-API with control failure scenarios |
| Inhibition codes | 10 | 10 | Verified via TM-API with IC failure scenarios |
| Quantification codes | 6 | 6 | Verified via TM-API with quant validation scenarios |
| CT/Threshold codes | 7 | 7 | Verified via TM-API with CT adjustment scenarios |
| Classification codes | 6 | 6 | Verified via TM-API with discrepancy scenarios |
| Bacteremia codes | 6 | 6 | Verified via TM-API with bacterial matching scenarios |
| Fluorescence codes | 5 | 5 | Verified via TM-API with fluorescence limit scenarios |
| Miscellaneous codes | 7 | 7 | Verified via TM-API with various condition scenarios |
| Parsing blocking codes | 6 | 6 | Verified via TM-API with malformed file import |
| Analysis blocking codes | 14 | 14 | Verified via TM-API with validation failure scenarios |
| IC mapping error code entity | 2 | 2 | Verified via TM-API with migration and export check |
| IC mapping missing observation | 2 | 2 | Verified via TM-API with BicqualRule detection scenarios |
Traceability to Existing Tests
| Test Case | Jira Test | Automation |
|---|---|---|
| TC-ERRORCODES-001 through TC-ERRORCODES-013 | [Pending] | Behat (Rules engine) |
| TC-ERRORCODES-014, TC-ERRORCODES-015 | [Pending] | Behat (File import) |
| TC-ERRORCODES-016 through TC-ERRORCODES-018 | [Pending] | Behat (Analysis validation) |
| TC-ERRORCODES-019 | [Pending] | Behat (IC mapping error code entity) |
| TC-ERRORCODES-020 | [Pending] | Behat (IC mapping missing observation) |
Notes
- ERRORCODES is a pure backend domain with no direct UI testing required
- Error codes are outputs of rule execution; testing requires triggering rules with appropriate input data
- All error codes listed in REQ-ERRORCODES-001 through REQ-ERRORCODES-009 are "seed codes" - they must exist in configuration
- Some rules produce outcomes only without error codes (RQUANTASQUAL, COMBINED_OUTCOME, LIMS_EXPORT, RRESOLUTION, RWAC, GAPDH_ENT, ICCT)
- Blocking errors (REQ-ERRORCODES-010, REQ-ERRORCODES-011) have higher priority due to their impact on processing flow
- Test data requirements are significant due to the number of rule types and error conditions