BorderAlmanac

How we test

How we test the rules

Rules as data, test cases worked out by hand, and the government’s own examples as tests.

Rules first, as data

Each rule is stored as a row: what it applies to, its limit, its window, the clause number, a short quote and the date of the version we read. The calculators read those rows. When the government changes a rule, we change the row and its date, and the result pages show the new version line.

Test cases written by hand, before the code

For every rule we write test cases with the expected answer worked out by hand from the rule text, and the calculator must match all of them before it opens. They include:

Counting choices are shown, not hidden

Where the rules leave a counting question open, such as whether the day you leave counts as a day abroad, the result says which way we counted and why.

Rule versions and dates

Every rule page shows the version it applies and the date we last checked it against the government page. Before each release we re-read those pages’ update dates. If a rule has changed, the affected calculator shows a notice and gives no result until we have checked the change.

What is checked today

No calculator is open yet. The worked example on the home page is computed by our build script from the 28-day rule, and the build stops if a date in it is wrong. Its rule version line reads UK-CR 2025-11-11 / guidance v10.0 (2026-10-08), checked November 17, 2026.

Found a mistake?

Email hello@borderalmanac.com with the page and the rule or source. Please don’t send case details.