STD: Resolution-Based LIMS Export Rule (RRESOLUTION)
Version: v1.0.0
Status: Draft
SRS Source: docusaurus/docs/srs/rules/rule-rresolution.md
Rule Name: RRESOLUTION
Domain: RULES-RRES
Overview
This document specifies tests for the RRESOLUTION rule using decision tables and test vectors. The rule sets a well's LIMS export value based on its assigned resolution code configuration when the resolution code is configured to set a LIMS Export code.
Rule Characteristics:
- Pure business logic (no UI)
- Two preconditions: resolution code exists AND resolution code has LIMS export enabled
- Single output: LIMS export value assignment
- No modification when preconditions fail
Test Method: TM-API (per Test Plan section 3.3 - 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 |
|---|
| REQ-RULES-RRES-001 | Set Well LIMS Export from Resolution Code | 3 | 5 | 100% | None |
Totals: 1 REQ, 3 Conditions, 5 Test Vectors, 100% Coverage
REQ-RULES-RRES-001: Set Well LIMS Export from Resolution Code
| Variable | Type | Valid Values | Description |
|---|
well.resolution_code | object/null | NULL, {valid resolution code} | Resolution code assigned to well |
resolution_code.sets_lims_export | bool | true, false | Flag indicating if resolution code controls LIMS export |
resolution_code.lims_export_value | string | Any valid LIMS code | The LIMS export value to assign when enabled |
well.lims_export (initial) | string | Any valid LIMS code | Well's current LIMS export before rule execution |
Output Variables
| Variable | Type | Description |
|---|
well.lims_export | string | Well's LIMS export value after rule execution |
modified | bool | Whether the rule modified the well's LIMS export |
Decision Table: Precondition Evaluation
This table covers the core matching logic based on the two preconditions:
- Resolution code exists (
well.resolution_code IS NOT NULL)
- Resolution code has LIMS export enabled (
resolution_code.sets_lims_export = TRUE)
| TV | well.resolution_code | resolution_code.sets_lims_export | resolution_code.lims_export_value | well.lims_export (initial) | expected well.lims_export | modified | Covers |
|---|
| TV-RRES-001-001 | NULL | N/A | N/A | ORIGINAL | ORIGINAL | false | AC: No resolution code - no modification |
| TV-RRES-001-002 | {RC-A} | false | null | ORIGINAL | ORIGINAL | false | AC: Resolution code exists but sets_lims_export=false - no modification |
| TV-RRES-001-003 | {RC-B} | true | RESOLVED_POS | ORIGINAL | RESOLVED_POS | true | AC: Both preconditions met - set LIMS export |
| TV-RRES-001-004 | {RC-C} | true | RESOLVED_NEG | PENDING | RESOLVED_NEG | true | AC: Different initial value - still overwritten |
| TV-RRES-001-005 | {RC-D} | true | ERROR_CODE | null | ERROR_CODE | true | AC: Null initial value - set to configured value |
Decision Table: Boundary and Edge Cases
| TV | Scenario | well.resolution_code | sets_lims_export | lims_export_value | expected_result | Covers |
|---|
| TV-RRES-001-006 | Empty string LIMS value | {RC-E} | true | "" | well.lims_export = "" | AC: Empty string is valid LIMS value |
| TV-RRES-001-007 | Same value as initial | {RC-F} | true | ORIGINAL | well.lims_export = ORIGINAL | AC: Value unchanged but rule executed |
Decision Table: Condition Combinations (Truth Table)
| TV | Condition 1: Resolution Code Exists | Condition 2: sets_lims_export = TRUE | Action | Covers |
|---|
| TV-RRES-001-TT1 | NO | N/A | No modification | AC: No modification - no resolution code |
| TV-RRES-001-TT2 | YES | NO | No modification | AC: No modification - LIMS export not enabled |
| TV-RRES-001-TT3 | YES | YES | Set well.lims_export | AC: Both conditions met - set value |
Automation Status
| REQ ID | Test Vectors | Automation Status | Notes |
|---|
| REQ-RULES-RRES-001 | TV-RRES-001-001 through TV-RRES-001-007, TV-RRES-001-TT1 through TV-RRES-001-TT3 | Automated | Rule logic tested via API |
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|
| REQ-RULES-RRES-001 | BT-5299 | Existing |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| None | - | All acceptance criteria covered by test vectors | - | - |
Coverage Notes
- The RRESOLUTION rule has simple binary logic with only two preconditions
- All three condition combinations are exhaustively tested
- Boundary cases (empty string, null initial value, same value) are included
- No multi-condition complexity or priority conflicts exist in this rule