Blog/Modernization

Modernization

Parity tests: proving a rebuild behaves the same

Vijay SubramanianCo-founder, EnWithAI

3 min read

Talk to us

One wave’s parity report

  1. MatchedSame result as the old system
  2. ExplainedDiffers on purpose, approved in the spec
  3. MismatchedFixed and re-run before acceptance
  4. AcceptedSigned by the business owner

Parity is counted per behavior, not per test.

A rebuilt system can pass every unit test and still behave differently from the one it replaces. Parity tests ask a simpler question: given the same inputs, does it do the same thing?

The short answer

Parity testing replays recorded runs of the old system against the rebuilt one and compares results behavior by behavior. Every mismatch is fixed or explained in the spec, and the business owner accepts each wave with the parity report in front of them.

Why new tests are not enough

Tests written for the new system check what its authors understood. If they missed a rule, the tests miss it too, and both sides agree with each other perfectly. Parity tests use the old system as the oracle instead. It is the one thing that knows every rule, including the ones nobody wrote down.

How a parity run works

  1. Take the recordings

    The same requests, scheduled runs and data captured from the old system during discovery.

  2. Replay them

    Run each one against the new system, in a test environment with the same starting data.

  3. Compare by behavior

    Group results by the behavior they exercise, so a failure points to a rule, not just a line in a log.

  4. Fix and re-run

    Every mismatch is fixed, or explained, and the run is repeated until the wave is clean.

Not every difference is a defect

Some differences are intended: a rounding bug the business wants fixed, a field renamed, a timestamp that will always differ. Those are written into the approved spec as intended changes, and the comparison ignores exactly those, nothing more.

BHV-0217

Claims with a fraud score above 70 are held for review.
Parity: 312 recorded claims replayed, 312 matched. Accepted in wave 2.

Waves, not a big bang

We move a system in waves: a slice of behaviors that can be rebuilt, proven and switched over on its own. Each wave has its own parity report and its own acceptance. Until a wave is accepted, the old system stays ready to take back over.

Go-live is not a date. It is the last accepted wave.

Who accepts the result

The parity report goes to the business owner, not only to engineering. It says, in their terms, which rules were proven, which differ on purpose, and which have open risk. A high match rate alone is not acceptance; their decision on the open items is.

In CrewPE

Recorded behavior is replayed against the new code, rule by rule. Your business owner accepts each wave at Gate 2, with the parity report as evidence.

See how modernization works

Questions teams ask

What is parity testing in legacy modernization?
Replaying recorded runs of the old system against the new one and comparing the results behavior by behavior, so the rebuild is proven against what the old system actually did.
What happens when the new system behaves differently?
Each mismatch is either fixed and re-run, or recorded in the approved spec as an intended change. Nothing is accepted while unexplained mismatches remain.
Who decides a wave is ready to go live?
The business owner, using the parity report: which behaviors matched, which differ on purpose, and any open risk. Engineering prepares the evidence; the owner accepts it.

Vijay Subramanian

Co-founder of EnWithAI, working on modernization delivery: recording what a system does and proving the rebuild does the same.

Keep reading

Bring one legacy application. See how its rebuild would be proven.

Start with a 45-minute call about your system: how it is built, where its business rules live, and a sensible first step.