Absent 11 days, charged for 10

One holiday rule lived in twelve places and gave two answers across leave, overtime and a public page. We test the copies against each other.
Case study
  • Workforce, timesheet and leave software
  • Time and leave platform built and tested by BetterQA
  • Money
  • Clients
  • Compliance
  • Reputation

Absent 11 days, charged for 10

A holiday that staff proposed and no admin had confirmed still counted in some parts of the product, and not in others.

For heads of HR technology and engineering at companies that calculate leave, overtime or billable time.

If your product calculates leave, overtime or billable time, that rule is probably written more than once, and the copies may disagree. BetterFlow is a time and leave platform that BetterQA builds and tests. In it, twelve places decided whether a calendar entry is a day off, and they gave two answers: in leave arithmetic, in the overtime ledger and on a public page.

What was at risk

MoneyLeave charged against the wrong number of daysIn one leave plan, an unconfirmed holiday inside the window made the employee absent for 11 working days and charged for 10.
ClientsStaff credited less overtime than they workedThe recovery ledger discarded overtime. A test now applies 2.0 hours where the old code applied 0.0.
ComplianceLeave records that disagree with each otherLeave balances and working time are often governed by labour law. Two answers to the same question is an audit problem.
ReputationA public page showing draft and rejected entriesThe public holidays endpoint served draft and admin-rejected rows, with date and title.
12places that decide whether a calendar entry is a day off
8of them never checked it was confirmed; 2 of those touched money
11 vs 10days absent against days charged, in one leave plan
4more readers found by a second, broader search

Standards and rules in play

  • One rule, one implementationFour implementations already answered approved-only. Eight did not check status. Twelve places, two answers.
  • Confirmed means confirmedStaff can propose an entry that an admin has not confirmed. Draft and rejected entries must not count as days off.

Leave and working-time rules are set by labour law and each employer's policy. This page describes testing, not legal advice or an audit.

How we tested it

Test level
Component and system integration testing: the holiday rule and every place that reads it, from leave arithmetic to the public API.
Test types
Functional; confirmation and regression testing, with a test that failed before the fix covering the public endpoint.
Test basis
The rule: only an approved entry is a day off.
  • TechniqueDecision table testingWhere it showed upEach caller was checked against the entry states: draft, approved and rejected.
  • TechniqueStatic testing (code census)Where it showed upThe first search looked for the scope's name. A broad search over every holiday query, 22 lines before and after, found four more readers.

Terms as in the ISTQB CTFL 4.0 glossary.

What we found, and what it costs

  • FindingMoneyLeave arithmetic counted an unconfirmed holiday as absence but not as a chargeWhat it costs you11 days absent, 10 charged: the employee and the books disagree.
  • FindingMoneyThe recovery ledger under-credited overtimeWhat it costs youIt was the opposite of how the issue was first described. Reading the code, not the ticket, found it.
  • FindingDisclosureThe public holidays page served draft and rejected entriesWhat it costs youAnyone could read dates and titles an admin had not approved.

Four dead call sites were deleted, and a second, broader search found four more readers the first census had missed.

What changed

Eight live call sites moved to one helper that checks the entry is confirmed, four dead ones were deleted, and a test that failed before the fix covers the public endpoint.

What this means for you: When a business rule touches money, count how many places implement it. If the answer is more than one, test them against each other.

What to check in your own product

  • CheckSearch broadly before you count the places that decide a rule.WhyA broad search over every holiday query, 22 lines before and after, found four more readers.
  • CheckCheck that public endpoints do not serve draft or rejected entries.WhyAnyone could read dates and titles an admin had not approved.
  • CheckRead the code, not only the ticket.WhyIt was the opposite of how the issue was first described.

How many places in your product decide the same business rule?

We find every place a rule lives and test them against each other. The first month is a trial.

Talk to our team
Share the Post: