Skip to content
Back to blog

Blog

How do you prove a replacement system preserves business rules?

Reading time
5 min read
Published
Last updated
How do you prove a replacement system preserves business rules?

A parity register that ties each business rule to a test sample and an approved result, a six-step comparison that leaves production untouched, and a time-zone bug we fixed in TeachTek.

Turn important rules into approved examples with inputs and expected outcomes, then compare both systems against those examples.

Before you retire the legacy system, you hold evidence that the replacement handles discounts, approval limits, rounding, due dates and permissions as the business decided. You also have a record of the old defects you chose to fix. Screens that look the same tell you nothing about any of this.

A business rule here is any decision the system makes for your staff: who approves an expense above a limit, how an amount with fractions is rounded, when an invoice falls due.

Collect examples from process owners

Cover a full business cycle for each process: creation, editing, approval, cancellation and reporting. Ask each process owner for three kinds of cases: ordinary ones, boundary cases, and the known errors staff work around today. A boundary case sits exactly on a limit, such as an amount equal to the approval limit or an invoice dated the last day of the month. Use synthetic data, or real data with names and personal numbers removed.

Write down where each rule comes from and who can approve its interpretation. When two departments read the same rule differently, keep the conflict open until the responsible owner settles it in writing. A developer who picks one reading in code has quietly set financial policy.

You need two kinds of test here. A characterisation test records what the old system does today, as it is. An acceptance test records what the business has decided the replacement should do.

The two sets agree on most rules. Where they differ, you have found an old bug. The process owner decides whether to keep or fix it before it becomes a requirement of the new system.

Keep a reproducible parity register

Article data table: Keep a reproducible parity register (1)
RuleTest sampleApproved result
Financial approval thresholdValues below, at and above the thresholdCorrect approval role for each case
Amount roundingFractions and permitted negative valuesA written rounding rule
Due dateMonth-end and the agreed time zoneDate matches business policy
CancellationBefore approval and after fulfilmentExplicit record and balance effects
Branch permissionsUsers belonging to different branchesIsolation or sharing matches the policy

Next to each row, record who approved the result. Compare individual records, distributions and exceptions as well as totals, because two mistakes can cancel each other out in an aggregate. Keep the test-data version and the rule version with every result, so a second reviewer can rerun it and get the same answer.

Compare the two systems in six steps

  1. Set up an isolated environment. Run the examples against test copies of both systems. A shadow run sends the replacement a copy of live transactions and lets it calculate results that nobody acts on. If you need one, get explicit approval and block it from sending messages, taking payments or writing to the production database. Check scheduled jobs too: a background job can send a real email while every test screen is read-only.
  2. Fix the clock. Give every test an explicit date, time and time zone. Rules that depend on time, such as a booking hold or a due date, return different answers depending on when the test runs.
  3. Run the examples on both systems and store both results next to the approved one.
  4. Classify every difference as one of four kinds: a defect in the replacement, an old defect the process owner has decided to correct, a difference in the data itself, or a rule nobody has settled yet.
  5. Tie each decision to its evidence. Accept a result only when the process owner signs it off with the evidence it rests on. Record who decided and when.
  6. Rerun the whole register after every change to rules or data. Fixing one rule can break another.

What a three-hour offset taught us

TeachTek is the booking platform for private teachers that we build and run. When a student requests a lesson time, TeachTek holds it for 60 minutes and releases it if the booking is not confirmed by then. Its homework upload links last 30 minutes. In October 2026 we found that the production database server ran on Amman time while the application wrote its times in UTC.

When PostgreSQL receives a time with no zone, it assumes the session's time zone. So every timestamp the application wrote to a time-zone-aware column was saved three hours early. A hold on a new booking would show a deadline two hours in the past, and a homework upload link would expire the moment it was created.

We fixed it on 21 October 2026 by pinning the database session to UTC. No stored record needed repair. A new test opens the session on Amman time, as the server does, and fails if the bug comes back.

The lesson for any replacement project is that the new environment is part of how a rule behaves. The deadline logic was right in the code and still produced wrong answers on a server set to a different time zone. Put an example for every time-dependent rule in your register, and run it on an environment whose time zone matches production.

Test day-to-day operation before you accept

Before cutover, the day your staff move to the new system, test a full day's volume of transactions, exports, removing a departing employee's access, restoring from backup and rolling back to the old system. Agree in writing who approves the cutover and which open differences block it.

Write down what your examples did not cover, and watch those processes closely in the first weeks after cutover.

Keep intentional changes apart from preserved behaviour. If the new system now rejects something the old one accepted, tell users before cutover. Give your support team a list of these changes, so they can tell a deliberate correction from a new bug.

Start your modernisation with these examples

Collect these examples before you start a legacy modernisation project. We begin the assessment with them and make them the acceptance test for every part we move. If you plan to replace the system in stages, read when to modernise one part of a legacy system. For the cutover day itself, read how to migrate to a new system without stopping operations.

Sources

Read our editorial policy

Building a custom system for your business?

After “How do you prove a replacement system preserves business rules?”: tell us scope, users, and integrations — we reply with a practical plan after reviewing your request.