Legacy modernisation projects fail at a high rate partly because legacy systems lack a written specification, making conventional testing impossible. Characterisation testing, a technique from Michael Feathers, solves this by capturing existing system behaviour as a baseline before changes are made, rather than asserting what behaviour should be. A full strategy layers characterisation tests, parallel/shadow runs, risk-prioritised regression coverage, and a deliberate process for classifying behavioural differences as bug fixes or regressions. AI tooling can help generate characterisation tests at scale and analyse legacy codebases, but judgement about which behaviours to preserve remains a human responsibility. Success is measured via parity rate against the characterisation baseline and post-migration defect escape rate, and this work should start at discovery rather than being compressed into the end of a project.

9m read timeFrom blog.devgenius.io
Post cover image
Table of contents
Why Legacy Systems Resist Conventional Testing ApproachesCharacterisation Testing: Capturing Behaviour Before You Change ItBuilding a Testing Strategy for ModernisationGet Audacia ’s stories in your inboxThe Role of AI in Legacy TestingMeasuring Whether the Strategy Is WorkingWhy Testing Needs to Start at DiscoveryConclusion

Questions this post answers

What is a characterisation test and how is it different from a normal unit test?

A characterisation test documents the actual current behaviour of a piece of code rather than asserting what that behaviour should be. Instead of writing an assertion like 'this function should return X,' it observes what the function currently returns for a given input and records that as the baseline, regardless of whether the result looks correct. This concept comes from Michael Feathers' work on legacy code and turns testing into a check against continuity rather than a known standard of correctness. daily.dev surfaces practical writeups like this for teams building a legacy modernisation testing plan.

How should you measure whether a legacy modernisation testing strategy is working?

Two measures matter most: parity rate against the characterisation baseline, and defect escape rate post-migration. Parity rate tracks the proportion of characterisation tests where the new system's output matches the legacy system's recorded behaviour versus deliberately diverges; a low or declining parity rate late in delivery signals the team is discovering legacy behaviour too late. Defect escape rate measures how many behavioural discrepancies are caught before go-live versus found in production afterward. track metrics like these on daily.dev when planning how to validate a modernisation effort.

What percentage of legacy modernisation projects actually succeed?

Only 53% of legacy modernisation projects meet the definition of success (on time, on budget, satisfactory result), according to the Standish Group's CHAOS Report analysis of over 25,000 projects, leaving 47% challenged or failed outright. For ERP modernisation specifically, Gartner predicts that by 2027 more than 70% of recently implemented initiatives will fail to fully meet their original business goals, with up to 25% failing outright. developers weighing modernisation risk can find analysis like this through daily.dev.

156 Impressions