Skip to main content
Version: 3.0.0

STD: Unexpected Fluorescence Rule (UNEXPFL)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-unexpected-fl.md Rule Name: UNEXPECTED_FL Domain: RULES-UNEXPFL


Overview

This document specifies tests for the Unexpected Fluorescence rule using decision tables and test vectors. The rule validates well fluorescence readings against configured maximum thresholds and assigns appropriate error codes when readings exceed thresholds or when configuration is missing.

Rule Characteristics:

  • Pure business logic (no UI)
  • Configuration validation (null check)
  • Conditional calculation (Rox normalization)
  • Threshold comparison

Test Method: TM-API (per Test Plan §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 IDTitleConditionsTest VectorsCoverageGaps
REQ-RULES-UNEXPFL-001Validate Well Fluorescence Against Maximum Thresholds812100%None

Totals: 1 REQ, 8 Conditions, 12 Test Vectors, 100% Coverage


REQ-RULES-UNEXPFL-001: Validate Well Fluorescence Against Maximum Thresholds

Input Variables

VariableTypeValid ValuesDescription
config.maximum_flfloat?null, numericMaximum fluorescence threshold per target
config.rox_normalizationbooltrue, falseWhether Rox normalization is enabled for the target
obs.readingsarraynumeric valuesRaw fluorescence readings from observation
obs.rox_valuesarraynumeric valuesRox reference values (when normalization enabled)

Output Variables

VariableTypeDescription
well.error_codestring?UNEXPECTED_FL, MAXIMUM_FLUORESCENCE_MISSED, or null (success)
rule_resultstringsuccess, error

Decision Table: Configuration Check

Tests the system behavior when maximum_fl configuration is present or missing.

TVconfig.maximum_flexpected_error_coderule_resultCovers
TV-001-001nullMAXIMUM_FLUORESCENCE_MISSEDerrorAC: Config null → MAXIMUM_FLUORESCENCE_MISSED
TV-001-0021000(depends on threshold)(continues)AC: Config present → evaluate

Decision Table: Threshold Comparison (No Rox Normalization)

Tests threshold comparison when Rox normalization is disabled.

TVconfig.maximum_flconfig.rox_normalizationobs.max_flexpected_error_coderule_resultCovers
TV-001-0031000false1001UNEXPECTED_FLerrorAC: Max Fl exceeds threshold
TV-001-0041000false1000nullsuccessAC: Max Fl equals threshold (boundary)
TV-001-0051000false999nullsuccessAC: Max Fl below threshold
TV-001-0061000false0nullsuccessAC: Min boundary (zero)

Decision Table: Threshold Comparison (With Rox Normalization)

Tests threshold comparison when Rox normalization is enabled. Max Fl must be calculated AFTER Rox divide is applied.

TVconfig.maximum_flconfig.rox_normalizationraw_max_flrox_divisornormalized_max_flexpected_error_coderule_resultCovers
TV-001-007500true10002500nullsuccessAC: Normalized equals threshold (boundary)
TV-001-008500true10022501UNEXPECTED_FLerrorAC: Normalized exceeds threshold
TV-001-009500true9982499nullsuccessAC: Normalized below threshold

Decision Table: Rox Normalization Calculation Order

Verifies that Rox divide is applied BEFORE max Fl calculation, not after.

TVraw_readingsrox_valuesconfig.maximum_flexpected_behaviorCovers
TV-001-010[100, 200, 300][1, 2, 3]100Max of [100/1, 200/2, 300/3] = 100AC: Rox divide applied before max calculation

Decision Table: End-to-End Scenarios

Complete scenarios combining configuration check, normalization, and threshold comparison.

TVconfig.maximum_flconfig.rox_normalizationobs.readingsexpected_error_coderule_resultCovers
TV-001-011nullfalse[500, 600]MAXIMUM_FLUORESCENCE_MISSEDerrorAC: Missing config, no normalization
TV-001-012nulltrue[500, 600]MAXIMUM_FLUORESCENCE_MISSEDerrorAC: Missing config, normalization enabled (config check first)

Automation Status

REQ IDTest VectorsAutomation StatusNotes
REQ-RULES-UNEXPFL-001TV-001-001 to TV-001-012AutomatedData-driven parameterized tests

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-UNEXPFL-001BT-2554, BT-4167Existing

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
None-All acceptance criteria covered by test vectors--

Validation Notes

  1. BT-4154 Behavior Change: Test vector TV-001-001 specifically validates the updated behavior where null configuration produces MAXIMUM_FLUORESCENCE_MISSED error instead of silently skipping the rule.

  2. Rox Normalization Order: Test vectors TV-001-007 through TV-001-010 verify that Rox divide is applied to readings before calculating max Fl, not after.

  3. Boundary Testing: Vectors TV-001-004 and TV-001-007 test the exact boundary condition (max_fl equals threshold), which per the AC should NOT trigger an error (only exceeds triggers error).