STD: Notts Quant Multiply Rule (NOTTSQM)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/rules/rule-notts-quant-multiply.mdRule Name: NOTES_QUANT_MULTIPLY Domain: RULES-NOTTSQM
Overview
This document specifies tests for the Notts Quant Multiply rule using decision tables and test vectors. The rule populates a well's quantity_multiplier property from its concentration_factor value during run analysis, defaulting to 1 when the concentration factor is null.
Rule Characteristics:
- Pure business logic (no UI)
- Simple conditional assignment (null check)
- Single input/output relationship
- Nottingham-specific custom rule
Test Method: TM-API (per Test Plan S3.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 | Automation Status | Gaps |
|---|---|---|---|---|---|---|
| REQ-RULES-NOTTSQM-001 | Set Quantity Multiplier from Concentration Factor | 2 | 8 | 100% | Automated | None |
Totals: 1 REQ, 2 Conditions, 8 Test Vectors, 100% Coverage
REQ-RULES-NOTTSQM-001: Set Quantity Multiplier from Concentration Factor
Input Variables
| Variable | Type | Valid Values | Description |
|---|---|---|---|
well.concentration_factor | float/null | null, 0, positive, negative, decimal | Concentration factor value to be used as multiplier source |
Output Variables
| Variable | Type | Description |
|---|---|---|
well.quantity_multiplier | float | Multiplier applied to downstream quantity calculations |
Decision Table: Concentration Factor to Quantity Multiplier Assignment
| TV | concentration_factor | expected_quantity_multiplier | Covers |
|---|---|---|---|
| TV-001-001 | null | 1 | AC: Null defaults to 1 |
| TV-001-002 | 250 | 250 | AC: Numeric value copied directly |
| TV-001-003 | 1 | 1 | AC: Value of 1 preserved (same as default) |
| TV-001-004 | 0 | 0 | AC: Zero handled as valid numeric |
| TV-001-005 | 0.5 | 0.5 | AC: Decimal value copied directly |
| TV-001-006 | 1000000 | 1000000 | AC: Large value copied directly |
| TV-001-007 | 0.001 | 0.001 | AC: Small decimal value copied directly |
| TV-001-008 | -1 | -1 | AC: Negative value copied directly (no transformation) |
Decision Table: Property Access Verification
| TV | Input Property | Output Property | Action | Covers |
|---|---|---|---|---|
| TV-001-009 | well.concentration_factor | well.quantity_multiplier | Read source, write target | AC: Correct property access |
Decision Table: Execution Context
| TV | Execution Trigger | Scope | Covers |
|---|---|---|---|
| TV-001-010 | Run analysis workflow | Well-level | AC: Rule operates at well-level during analysis |
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|---|---|
| REQ-RULES-NOTTSQM-001 | BT-3952 (Manual), BT-5359 (Automated) | Existing |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|---|---|---|---|
| - | - | No gaps identified | - | - |
Coverage Notes
All acceptance criteria from REQ-RULES-NOTTSQM-001 are covered by the test vectors:
- Value Assignment (AC 1-3): TV-001-001 through TV-001-008 cover null handling, direct copy, and no-transformation requirements
- Property Handling (AC 4-6): TV-001-009 verifies correct property read/write
- Scope and Execution (AC 7-8): TV-001-010 verifies well-level scope during run analysis
The existing Jira tests BT-3952 (manual) and BT-5359 (automated Behat) provide verification coverage. Test vectors TV-001-001, TV-001-003, TV-001-009, and TV-001-010 are tagged to BT-5359. Test vectors TV-001-001 and TV-001-002 directly correspond to the Gherkin test scenarios documented in the SRS.