Test Both Sides of Every Numeric Threshold
Prepared with AI assistance by Alactic Editorial. Examples identified as hypothetical are illustrative, not customer results.
An automation routes a small request correctly and sends a large request for review. That does not prove it handles the cutoff correctly. A rule described as “review at 80 points” could mean greater than 80, greater than or equal to 80, or a displayed score that rounds to 80. Each interpretation produces different results.
Test a value just below the threshold, the exact threshold, and a value just above it. Define “just” using the precision the rule actually accepts. Then repeat those checks around any rounding or conversion step that can change the branch. The expected result must come from an agreed specification, not from whatever the automation currently does.
This is boundary value testing for automation thresholds: checking the places where a small numeric change should alter behavior. The worksheet below turns that principle into a reviewable test plan. It verifies a configured rule; it does not recommend where a business should set its threshold.
1. Translate the threshold into an executable statement
Start with the sentence people use to describe the rule. Then replace ambiguous language with a comparison, a unit, and named outcomes.
Fictional worked example: An internal operations workflow assigns a workload score to a submitted request. The team has already chosen a hypothetical threshold of 80 points. Requests at or above that score should enter an internal review queue. Requests below it should continue through standard processing. Neither branch authorises an external action.
A useful rule statement is:
When a request is submitted:
Validate workload_score as points.
Accept non-negative decimal values with up to 3 decimal places.
Normalize the score to 2 decimal places using decimal half-up rounding.
If normalized_score >= 80.00:
route to internal review
Otherwise:
route to standard processing
If validation fails:
hold for correction; do not choose either numeric branchThis statement settles more than the comparison operator. It identifies when the rule runs, which value it compares, how it rounds, and what happens when the input is unusable. These details are proposed assumptions for this fictional example, not claims about a product feature.
Keep the original wording alongside the executable statement. If one says “above 80” and the other uses >= 80.00, the specification is still contradictory. Ask the rule owner to resolve it before treating the test as authoritative.
2. Choose neighbors at the right precision
For whole-number inputs, the immediate neighbors of a hypothetical threshold of 80 are 79 and 81. For inputs accepted to three decimal places, they are 79.999 and 80.001. Testing only whole numbers misses behavior that decimal inputs can expose.
Use two sets of neighbors when the workflow transforms a value before comparing it:
- Input neighbors: the closest permitted raw values below and above the stated threshold.
- Decision neighbors: raw values around the point where normalization changes the branch.
In the fictional rule, 79.999 is below 80 as a raw value but rounds to 80.00. It should therefore enter review. The effective transition occurs at 79.995 under the specified decimal half-up rule: 79.994 becomes 79.99, while 79.995 becomes 80.00.
That is not necessarily a defect. It is a consequence of rounding before comparison. If the intended policy is to compare the unrounded score, the configuration must change. Testing makes that choice visible rather than silently deciding it.
Do not use an arbitrary tiny increment that the input cannot retain. If a field accepts only two decimal places, entering a third may trigger rejection, truncation, or rounding before the rule runs. First establish the smallest supported input step; then select the neighboring cases.
3. Use this filled boundary worksheet
Hypothetical worksheet: internal workload review. All values and outcomes in this worksheet are fictional worked examples. The expected outcomes assume the rule above has been approved. Actual results remain unrecorded until someone executes the cases.
Rule and representation
- Input: workload score, measured in points; not a percentage or currency amount.
- Accepted domain: non-negative decimal values with up to three decimal places. No upper limit has yet been specified.
- Normalization: decimal half-up rounding to two decimal places before comparison. No truncation.
- Comparison: normalized score greater than or equal to 80.00 points.
- Expected branches: review at or above the limit; standard processing below it; correction hold for invalid input.
- Display assumption: show the normalized score to two decimal places. Retain the raw input in test evidence.
- Execution status: not run. Every case needs an observed branch and pass, fail, or blocked result.
Filled expected cases
- B01 — ordinary below: raw input 65.000 points → normalized 65.00 → standard processing. Confirms the lower branch is reachable.
- B02 — ordinary above: raw input 92.000 points → normalized 92.00 → internal review. Confirms the review branch is reachable.
- B03 — just below the stated threshold: raw input 79.999 points → normalized 80.00 → internal review. Detects comparison against raw input instead of normalized input.
- B04 — exact stated threshold: raw input 80.000 points → normalized 80.00 → internal review. Detects an exclusive
>operator where an inclusive>=operator is intended. - B05 — just above the stated threshold: raw input 80.001 points → normalized 80.00 → internal review. Confirms that rounding does not create an unexpected alternative route.
- B06 — just below the rounding transition: raw input 79.994 points → normalized 79.99 → standard processing.
- B07 — exact rounding transition: raw input 79.995 points → normalized 80.00 → internal review. Distinguishes the agreed half-up behavior from truncation.
- B08 — just above the rounding transition: raw input 79.996 points → normalized 80.00 → internal review.
- B09 — valid domain edge: raw input 0.000 points → normalized 0.00 → standard processing. Confirms zero is not mistaken for missing input.
- B10 — negative value: raw input -0.001 points → no normalized decision value → correction hold.
- B11 — missing value: raw input blank → no normalized decision value → correction hold, not an assumed zero.
- B12 — excess precision: raw input 79.9949 points → correction hold because four decimal places exceed the agreed input precision. Do not silently round it into an accepted input.
Unresolved specification questions
- Upper domain limit: what is the largest valid workload score? Add the maximum and its neighbors after the owner defines it.
- Alternative input formats: should comma decimals, grouping separators, or scientific notation be accepted? Expected outcomes for these formats remain blocked.
- Edits after submission: should changing a score rerun routing, and what should happen to an existing review assignment?
- Existing requests: does a rule change affect only new submissions, or should selected existing requests be reassessed?
This worksheet is deliberately not marked ready for unrestricted rollout. Filled expected cases can expose defects now, while unresolved questions remain visible as decisions rather than being hidden inside implementation behavior.
4. Separate input, stored, displayed, and compared values
A screen showing 80.00 does not establish that the rule compared 80.00. The workflow might store 79.999, display a rounded value, and compare the stored value. Alternatively, an input control might round the value before storage.
For each boundary case, capture a small evidence chain:
- The value submitted and its unit.
- The value retained after parsing or conversion, where observable.
- The normalized value used for the comparison, where observable.
- The resulting branch and resulting queue or status.
If an intermediate value is not observable, record that limitation. Do not infer the calculation solely from a formatted label. Ask for suitable diagnostic evidence or classify the rounding assumption as unverified.
Labels should make the input purpose clear. W3C guidance explains that form controls need labels identifying their purpose and that those labels should be programmatically associated with the controls. For a threshold input, a clear label such as “Workload score in points” also helps reviewers avoid unit confusion. See the W3C guidance on labeling controls.
5. Test units and invalid inputs separately
Correct arithmetic on the wrong unit still produces the wrong decision. A value of 0.80 is not interchangeable with 80 unless the specification defines the conversion. Likewise, hours and minutes require an explicit conversion before comparison.
For each numeric field, state the input unit, any stored unit, and the comparison unit. If conversion is required, document its order relative to rounding. Converting a rounded input can produce a different result from rounding after conversion.
Keep invalid-input checks separate from numeric boundary checks. Blank, malformed, and unsupported values should not quietly become zero or inherit the last valid score. In the fictional worksheet, these values enter a correction hold; another workflow may require a different explicitly approved response.
Test relevant input routes, not only the visible form. W3C validation guidance notes that client-side checks do not replace server-side validation and recommends understandable, accessible errors. That matters when a form rejects excess precision but another accepted submission route passes it through. See the W3C guidance on validating input.
6. Run the worksheet against the configured workflow
Use an isolated test environment or otherwise controlled, authorised test setup. Prevent test records from triggering external communications or other consequential actions. Confirm which controls and environments are available in the workspace and current plan rather than assuming a particular testing feature exists.
- Record the configuration under test. Capture the rule revision, threshold, comparison operator, normalization settings, and test date.
- Create distinct test records. Give every worksheet case a traceable identifier so results cannot be confused with another run.
- Submit through the intended path. Exercise the actual trigger rather than manually assigning the expected destination.
- Observe the branch and its effect. Check both the decision result and the resulting queue or status. A correct decision can still be connected to the wrong action.
- Record actual results. Mark pass only when the observed outcome matches the agreed expectation. Mark unresolved expectations blocked, not passed.
Start by changing only the score. Once the numeric boundary behaves correctly, add conditions that can alter routing, such as request type or an existing review state. This keeps the first failure interpretable without ignoring later interactions.
7. Diagnose failures without moving the goalposts
If the exact threshold follows the lower branch, inspect inclusivity first. If the raw neighbors behave unexpectedly, inspect normalization order. If identical inputs differ by submission route, inspect parsing and validation along each route.
When the specification and configured behavior disagree, preserve the failing example before making changes. Decide whether the defect is in the rule or in the documented expectation. Do not rewrite the expected result simply because the system consistently produces another outcome.
There is a real trade-off between comparing raw values and normalized values. Raw comparison preserves finer distinctions but can appear inconsistent with a rounded display. Normalized comparison aligns with that display but moves the effective input boundary. Neither choice is universally correct; the rule owner must approve the intended interpretation.
If a mismatch is found after rollout, contain the affected routing through an authorised process. Identify records evaluated under the faulty configuration, then review them before replaying anything. Reassessment must account for actions already completed so a correction does not create duplicate assignments or other side effects.
8. Set a measurable release gate
For this fictional worksheet, the first target is twelve executed cases with recorded evidence, no unexplained mismatches, and explicit decisions on the four unresolved questions. Those decisions may require additional tests, including cases around an agreed maximum.
Make the next review concrete: ask the rule owner to sign off on the comparison operator, accepted precision, rounding mode, conversion order, and invalid-input response. Then have a tester record raw input, normalized value, expected branch, observed branch, and result for every case.
Retain the worksheet as a regression check whenever the threshold, numeric field, parser, or routing logic changes. A threshold is ready to rely on when its neighbors behave as specified—not merely when an ordinary small value and an ordinary large value look right.
Put the next conversation to work.
Explore Alactic Communications for WhatsApp conversations, campaigns and AI-assisted workflows. Choose the product and plan that fit your team.
Explore Communications