STD: Reanalyze (REANALYZE)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/reanalyze.mdDomain: REANALYZE
Overview
This document specifies tests for the Reanalyze domain, which covers reanalysis of PCR run results including SKIP resolution code processing, outcome message display, Westgard control management, resolution proposal handling, and Westgard series change management.
Domain Characteristics:
- Primary function: Result resolution and reanalysis workflow
- Secondary function: Westgard QC control management
- Configuration dependency: Resolution codes configuration, LJ plot settings
Test Method Rationale:
Per Test Plan §3.2-3.3, REANALYZE contains significant backend logic (rule bypass, Westgard calculations, conflict detection) tested via TM-API, with UI-facing features (outcome display, LJ plots, resolution selection) tested via TM-UI. The Westgard calculation rules are deterministic and testable at the service boundary.
Test Case Convention:
Steps describe logical actions, not UI mechanics. Use "Resolve the control error" or "Set LIMS Export to Re-extract", not "Click the resolve button" or "Select Re-extract from dropdown". This ensures test intent survives UI redesigns.
Coverage Summary
| REQ ID | Title | ACs | Tests | AC Coverage | Method | Gaps |
|---|---|---|---|---|---|---|
| REQ-REANALYZE-001 | Bypass Rule Processing with SKIP Resolution Code | 6 | TC-REANALYZE-001, TC-REANALYZE-002, TC-REANALYZE-003 | 6/6 (100%) | TM-API | None |
| REQ-REANALYZE-002 | Display Outcome Messages with Export Status | 3 | TC-REANALYZE-004 | 3/3 (100%) | TM-UI | None |
| REQ-REANALYZE-003 | Exclude Resolved Controls from Westgard Calculations | 5 | TC-REANALYZE-005, TC-REANALYZE-006 | 5/5 (100%) | TM-API | None |
| REQ-REANALYZE-004 | Apply Date-Based Westgard Error Propagation | 3 | TC-REANALYZE-007, TC-REANALYZE-008 | 3/3 (100%) | TM-API | None |
| REQ-REANALYZE-005 | Display Control Status on LJ Plots | 4 | TC-REANALYZE-009, TC-REANALYZE-010, TC-REANALYZE-011 | 4/4 (100%) | TM-UI | None |
| REQ-REANALYZE-006 | Select Resolution Proposals | 3 | TC-REANALYZE-012 | 3/3 (100%) | TM-UI | None |
| REQ-REANALYZE-007 | Prevent Conflicting Resolution Proposals | 4 | TC-REANALYZE-013, TC-REANALYZE-014 | 4/4 (100%) | TM-API | None |
| REQ-REANALYZE-008 | Update Reanalysis Status for Westgard Series Changes | 3 | TC-REANALYZE-015, TC-REANALYZE-016 | 3/3 (100%) | TM-API | None |
Totals: 8 REQs, 31 ACs, 16 Test Cases, 100% Coverage
Test Cases
TC-REANALYZE-001: SKIP resolution code prevents further rule processing
Verifies: REQ-REANALYZE-001 (AC1, AC2, AC3)
Method: TM-API
Priority: Critical
Preconditions:
- Runfile imported with patient wells having multiple error conditions
- Resolution codes configured with 'skip all' concept
Test Data:
- Well A1: CLS discrepancy AND inhibited IC
- LIMS Export values to test: DETECTED, NOT DETECTED, INCONCLUSIVE, RPT, RXT, TNP
Steps:
- Import runfile with a well that has a CLS discrepancy AND inhibited IC
- Set LIMS Export on that well to report 'Detected'
- Export run
- Verify well outcome
Expected Results:
- AC1: Setting LIMS Export with SKIP resolution code prevents further rules from executing on that well
- AC2: SKIP behavior applies to resolution types RPT, RXT, TNP, Do Not Report
- AC3: Well has 'Detected' in results column (no additional errors triggered despite multiple error conditions)
Automation Status: Automated
Jira: BT-220
TC-REANALYZE-002: LIMS Export modification and re-export confirmation
Verifies: REQ-REANALYZE-001 (AC4, AC5)
Method: TM-API
Priority: High
Preconditions:
- Runfile imported with patient wells
- Initial export completed
Test Data:
- Well A1: Initially exported as Re-extract
- Subsequent changes: TNP, then Re-amplify
Steps:
- Import runfile with multiple patient wells
- Set LIMS Export = Re-extract for well A1
- Export the runfile
- Verify export file contains Re-extract for A1
- Change LIMS Export = TNP for well A1
- Export the runfile (confirm when prompted)
- Verify export file contains TNP for A1
- Change LIMS Export = Re-amplify for well A1
- Export the runfile (confirm when prompted)
- Verify export file contains Re-amplify for A1
Expected Results:
- AC4: Users can modify LIMS Export for a patient well after initial export
- AC5: System requires confirmation when exporting a well more than once
Automation Status: Deferred (requires LIMS export step definitions — ISSUE-014)
Jira: BT-220
TC-REANALYZE-003: SKIP resolution code configuration requirement
Verifies: REQ-REANALYZE-001 (AC6)
Method: TM-API
Priority: High
Preconditions:
- Access to configuration management
Test Data:
- Configuration with resolution_codes column containing 'skip all' concept
- Configuration without 'skip all' concept
Steps:
- Verify configuration sheet has 'skip all' concept in resolution_codes column
- Attempt to use SKIP behavior on a well
- Verify SKIP behavior functions correctly
- Remove 'skip all' configuration
- Verify SKIP behavior is not available
Expected Results:
- AC6: System requires 'skip all' concept configured in config sheet resolution_codes column for SKIP behavior to function
Automation Status: Automated
Behat: BT-9793 — 192_BT-9793_skip-config.feature (2 scenarios: with/without SKIP concept, both pass)
Jira: BT-220
TC-REANALYZE-004: Outcome message display and update workflow
Verifies: REQ-REANALYZE-002 (AC1, AC2, AC3)
Method: TM-UI
Priority: High
Preconditions:
- Runfile imported with patient wells
Test Data:
- Well A1: Initial outcome "Not Detected"
Steps:
- Import runfile with well A1 showing "Not Detected"
- Export the runfile
- Observe outcome message for A1
- Change A1 outcome to "Re-extract"
- Observe outcome message for A1
- Export the runfile again
- Observe outcome message for A1
Expected Results:
- AC1: After export, A1 displays "Exported: Not Detected"
- AC2: After user changes to Re-extract, A1 shows updated message indicating pending re-extract
- AC3: After subsequent export, A1 displays "Exported: Re-extracted"
Automation Status: Automated
Jira: BT-218
TC-REANALYZE-005: Resolved control excluded from Westgard calculations
Verifies: REQ-REANALYZE-003 (AC1, AC2, AC3)
Method: TM-API
Priority: Critical
Preconditions:
- Westgard rules configured for applicable control types
- Historical control data available
Test Data:
- Run 1: Control more than 3 SD from mean (triggers 1.3S error)
- Run 2: Control more than 2 SD from mean (would trigger 2.2S if compounding)
Steps:
- Upload runfile with control more than 3 SD from mean
- Verify control shows Westgard error (1.3S)
- Resolve the error in the runfile control
- Verify Westgard In Error status removed from that control
- Upload runfile with control more than 2 SD from mean
- Verify the second control error message is NOT a WG 2.2S error
Expected Results:
- AC1: Resolved control is excluded from all Westgard rule calculations
- AC2: Resolving a control removes the Westgard In Error status from that control
- AC3: Subsequent control failing at lower sigma level does not trigger compounding rules using the resolved control
Automation Status: Automated
TC-REANALYZE-006: Reanalysis prompt after Westgard resolution
Verifies: REQ-REANALYZE-003 (AC4, AC5)
Method: TM-API
Priority: High
Preconditions:
- Multiple runfiles with Westgard control data
- First runfile has control triggering Westgard error affecting subsequent runs
Test Data:
- Run 1: Control more than 3 SD from mean
- Run 2: Control less than 2 SD from mean (showing 'In Error from previous failed control')
Steps:
- Upload runfile with control more than 3 SD from mean
- Upload runfile with control less than 2 SD from mean
- Open the second runfile
- Verify control shows 'In Error from previous failed control'
- Open the first runfile
- Resolve the 1.3S error using each resolution option:
- Exclude well
- Reamplify positive samples
- Re-extract positive samples
- Open the second runfile
- Verify reanalysis prompt is presented
Expected Results:
- AC4: System prompts user to reanalyze runs with well errors triggered by now-resolved Westgard In Error state
- AC5: Reanalysis prompt presented for each resolution option: exclude well, reamplify positive samples, re-extract positive samples
Automation Status: Automated
TC-REANALYZE-007: Date-based Westgard error propagation
Verifies: REQ-REANALYZE-004 (AC1)
Method: TM-API
Priority: Critical
Preconditions:
- Westgard rules configured
- Ability to upload runfiles with different extraction dates
Test Data:
- Run 1: Control more than 3 SD from mean, extraction date = Date A
- Run 2: Control less than 2 SD from mean, extraction date < Date A (earlier)
Steps:
- Upload runfile with control more than 3 SD from mean (triggers Westgard error)
- Upload runfile with control less than 2 SD that was created EARLIER than first runfile
- Open the second runfile
- Observe the control status
Expected Results:
- AC1: Westgard In Error status does not affect controls with extraction date earlier than the triggering control
Automation Status: Automated
Jira: BT-219
TC-REANALYZE-008: Same-run controls Westgard handling
Verifies: REQ-REANALYZE-004 (AC2, AC3)
Method: TM-API
Priority: High
Preconditions:
- Westgard rules configured
- Runfile with multiple controls
Test Data:
- Runfile with 2 controls, both between 2 and 3 SD from the mean
Steps:
- Upload runfile with 2 controls between 2 and 3 SD from mean
- Observe Westgard warnings on both controls
Expected Results:
- AC2: For controls with identical date/time (same run), second control processed checks first control as history
- AC3: One control shows 1.2S warning and the other control shows 2.2S warning
Automation Status: Automated
Jira: BT-219
TC-REANALYZE-009: LJ plot control status visual distinction
Verifies: REQ-REANALYZE-005 (AC1)
Method: TM-UI
Priority: High
Preconditions:
- Runfile with failed Westgard rule
- LJ plot accessible
Test Data:
- Run with: resolved control, unresolved error control, normal control
Steps:
- Upload runfile with a failed Westgard rule
- Resolve the error on one control
- Upload another runfile with a normal control
- Enable display of resolved controls in settings
- View the LJ plot
Expected Results:
- AC1: Resolved controls are visually distinguished from unresolved error controls and normal controls
Automation Status: Automated
Jira: BT-219
TC-REANALYZE-010: LJ plot legend availability
Verifies: REQ-REANALYZE-005 (AC2)
Method: TM-UI
Priority: Medium
Preconditions:
- LJ plot populated with control data
Test Data:
- Multiple runs with various control states
Steps:
- Navigate to LJ plot view
- Observe plot area (no legend visible)
- Open settings
- Locate legend
Expected Results:
- AC2: Legend describing control status indicators is available in settings
Automation Status: Automated
Jira: BT-219
TC-REANALYZE-011: LJ plot resolved control visibility toggle
Verifies: REQ-REANALYZE-005 (AC3, AC4)
Method: TM-UI
Priority: High
Preconditions:
- LJ plot with resolved controls in data set
Test Data:
- Run with at least one resolved control
Steps:
- Upload runfile with failed Westgard rule
- Resolve the error
- View LJ plot with default settings
- Observe resolved control visibility
- Toggle "Show resolved controls" setting ON
- Observe resolved control visibility
Expected Results:
- AC3: By default, resolved controls are hidden from the LJ plot
- AC4: Users can toggle visibility of resolved controls
Automation Status: Deferred (requires browser/visual LJ plot testing — TM-UI only)
Jira: BT-219
TC-REANALYZE-012: Resolution proposal selection workflow
Verifies: REQ-REANALYZE-006 (AC1, AC2, AC3)
Method: TM-UI
Priority: High
Preconditions:
- Manage results interface available
- Well with applicable resolution options
Test Data:
- Well requiring resolution with primary and secondary options available
Steps:
- Open manage results interface for a well requiring resolution
- Select a primary resolution option
- Verify primary option selected without requiring secondary selection
- Attempt to select secondary option without primary selected (deselect primary first)
- Verify secondary option selection blocked
- Select primary option, then select secondary option
- Apply the resolution
Expected Results:
- AC1: Users can select a primary resolution option without selecting a secondary option
- AC2: Secondary options require the corresponding primary option to be selected first
- AC3: Selected proposals are applicable to the target well
Automation Status: Automated
Jira: BT-678
TC-REANALYZE-013: Resolution conflict detection - two-step workflow
Verifies: REQ-REANALYZE-007 (AC1, AC2, AC4)
Method: TM-API
Priority: Critical
Preconditions:
- Run with multiple controls (CC1, CC2) affecting overlapping patient wells
- Two-step resolution workflow configured
Test Data:
- CC1 and CC2 both affect wells W1, W2, W3
- CC1 proposed resolution: re-amplify all neg
- CC2 proposed resolution: re-extract all neg (would conflict)
Steps:
- Open run with multiple controls affecting same patient wells
- Propose "re-amplify all neg" resolution on CC1
- Verify proposal recorded but not yet confirmed
- Attempt to propose "re-extract all neg" on CC2 (affects same wells)
Expected Results:
- AC1: Users cannot propose a resolution to a control that would affect a patient well with existing pending resolution
- AC2: In two-step workflow, conflict detection occurs when resolution is proposed but not yet confirmed
- AC4: Error displayed indicating the patient well already has a pending resolution from another control
Automation Status: Automated
Jira: N/A (requires investigation per SRS)
TC-REANALYZE-014: Resolution conflict detection - one-step workflow
Verifies: REQ-REANALYZE-007 (AC3)
Method: TM-API
Priority: High
Preconditions:
- Run with multiple controls affecting overlapping patient wells
- One-step resolution workflow configured
Test Data:
- Same as TC-REANALYZE-013 but with one-step workflow
Steps:
- Open run with multiple controls affecting same patient wells
- Propose and save "re-amplify all neg" resolution on CC1
- Attempt to save "re-extract all neg" resolution on CC2
Expected Results:
- AC3: In one-step workflow, conflict detection occurs prior to saving proposed changes
Automation Status: Automated
Jira: N/A (requires investigation per SRS)
TC-REANALYZE-015: Westgard series modification triggers reanalysis status
Verifies: REQ-REANALYZE-008 (AC1, AC2)
Method: TM-API
Priority: High
Preconditions:
- Existing Westgard series with multiple runs
Test Data:
- Run A: Date A, westgard 1.2S outcome
- Run B: Date < Date A (to be added to middle of series)
Steps:
- Create Run A with westgard 1.2S outcome at Date A
- Add new Run B with date earlier than Date A (inserting into middle of series)
- Observe Run A status
Expected Results:
- AC1: Adding a run into the middle of a Westgard series triggers "Reanalysis required (Westgard)" status on affected future runs (Run A)
Verification for AC2 (removal):
- Remove a run from the middle of an established Westgard series
- Observe affected future runs status
- AC2: Removing a run from the middle of a Westgard series triggers "Reanalysis required (Westgard)" status on affected future runs
Automation Status: Automated
Behat: BT-9794 — 190_BT-9794_wg-series-modify.feature (2 scenarios: add run via extraction date, remove run via extraction instrument, both pass)
Jira: BT-4919
TC-REANALYZE-016: Control role change triggers reanalysis status
Verifies: REQ-REANALYZE-008 (AC3)
Method: TM-API
Priority: High
Preconditions:
- Multiple runs with controls in different roles
Test Data:
- Run A: well A1, Role A, Date A, westgard 1.2S
- Run B: well A1, Role A, Date > Date A, westgard 2.2S
- Run C: well A1, Role B, Date > Date A, westgard 1.2S
Steps:
- Set up runs A, B, C as specified in test data
- Change Run A well A1 role from Role A to Role B
- Observe Run B status
- Observe Run C status
Expected Results:
- AC3: Changing control role assignments triggers "Reanalysis required (Westgard)" status on runs affected by the role change
- Run B status updates to "Reanalysis required (Westgard)"
- Run C status updates to "Reanalysis required (Westgard)"
Automation Status: Automated (@KNOWN_CODE_ISSUE — ISSUE-018: EditSampleRole does not propagate Westgard reanalysis status)
Behat: BT-9795 — 191_BT-9795_wg-role-change.feature (1 scenario: role change NEC→POS, KCI — documents actual behavior vs expected per AC3)
Jira: BT-4919
Gap Analysis
No gaps identified. All 31 acceptance criteria have test coverage.
Coverage by AC Type
| AC Category | Count | Covered | Notes |
|---|---|---|---|
| Rule Processing/Logic | 9 | 9 | Verified via TM-API |
| Display/Rendering | 6 | 6 | Verified via TM-UI |
| Westgard Calculations | 8 | 8 | Verified via TM-API |
| Interaction/Selection | 4 | 4 | Verified via TM-UI |
| Conflict Detection | 4 | 4 | Verified via TM-API |
Traceability to Existing Tests
| Test Case | Jira Test | Automation | Status |
|---|---|---|---|
| TC-REANALYZE-001 | BT-220 | Behat (BT-5249, BT-9561) | Automated |
| TC-REANALYZE-002 | BT-220 | N/A | Deferred (LIMS export steps) |
| TC-REANALYZE-003 | BT-220 | Behat (BT-9793) | Automated |
| TC-REANALYZE-004 | BT-218 | Selenium | Automated |
| TC-REANALYZE-005, TC-REANALYZE-006 | BT-219, BT-201 | Behat (BT-5090, BT-5092, BT-5093, BT-5127) | Automated |
| TC-REANALYZE-007, TC-REANALYZE-008 | BT-219 | Behat (BT-5184, BT-5185, BT-5089, BT-5091, BT-5106) | Automated |
| TC-REANALYZE-009, TC-REANALYZE-010 | BT-219 | Selenium | Automated |
| TC-REANALYZE-011 | BT-219 | N/A | Deferred (browser LJ plot) |
| TC-REANALYZE-012 | BT-678 | Behat (BT-5774) / Selenium | Automated |
| TC-REANALYZE-013, TC-REANALYZE-014 | N/A | Behat (BT-5770, BT-5771, BT-5769) | Automated |
| TC-REANALYZE-015 | BT-4919 | Behat (BT-9794) | Automated |
| TC-REANALYZE-016 | BT-4919 | Behat (BT-9795) | Automated (KCI: ISSUE-018) |
Notes
- REANALYZE is a backend-heavy domain with significant Westgard QC calculation logic
- Westgard-related tests (REQ-003, 004, 008) require specific statistical control data setup
- REQ-REANALYZE-007 has no associated Jira ticket per SRS note (marked for investigation)
- Existing Gherkin tests in SRS cover many scenarios; this STD formalizes method and coverage
- TC-REANALYZE-013 and TC-REANALYZE-014 test same conflict detection logic under different workflow configurations