2.5 rounds to 2. Is that a bug or just Tuesday?

The UI says 3. The API says 2. Finance would like a word.

A new Ministry of Testing glossary entry highlights “round half to even.” At an exact midpoint, this rule selects the nearest even integer: 2.5 becomes 2, but 3.5 becomes 4. Neither result alone proves a defect. The agreed rule decides.

Try a small challenge on a calculation in your test environment:
• Confirm the required rounding rule and decimal precision.
• Test exact midpoint values, negative values, and values just above and below each midpoint.
• Compare the UI, API, and stored result against that requirement.
• Compare “round each line, then sum” with “sum, then round.” Confirm which total the product requires.

Use exact decimal inputs where possible. Binary floating-point representation can introduce a separate surprise. Define expected results independently of the calculation under test.

Katalon community challenge: What is your best “one tiny decimal, one very long investigation” story? Share an anonymized example—or the first numeric edge case you would add to your suite.

Source: Round Half to Even | MoTaverse

This happened to me but not due to digit or decimal, but due to whitespaces. And surely, it is a a good reminder that the requirement decides, not the output.

My tiny-thing story: a dropdown was failing with NoSuchElementException even though the API value matched what I expected. The culprit was invisible whitespace (a non-breaking space) that the UI rendered as a normal space. Printing the character codes exposed it, and normalizing the text fixed it.