Horizon LabsHorizon Labs
Back to Insights
11 Sept 2026Updated 11 Sept 20267 min read

AI-Augmented Test Automation for Legacy Modernisation

AI-augmented test automation uses machine learning to generate, maintain, and prioritise software tests — a genuine accelerant for legacy modernisation, but not a substitute for human judgment on test intent. This piece sets out where AI-generated tests are reliable, where human review stays essential, and how to structure a testing strategy around both.

AI-Augmented Test Automation for Legacy Modernisation

AI-augmented test automation is the use of machine learning models to generate, maintain, or prioritise software tests — typically by analysing existing code, historical test runs, or application behaviour to produce test cases without an engineer writing each one from scratch. In a modernisation context, this usually means using AI to build a regression safety net around legacy code before it is refactored or replaced, so changes can be verified quickly rather than manually re-checked line by line. It is a genuine accelerant for the mechanical parts of testing — but it is not a substitute for a test strategy, and it does not guarantee that a legacy system's behaviour has been fully captured.

What is AI-augmented test automation?

More precisely, AI-augmented testing tools analyse source code, execution traces, and historical test results to infer likely test cases — unit tests for a function's observed inputs and outputs, integration checks for API contracts, or regression tests that compare behaviour before and after a change. Some tools also prioritise which existing tests to run based on what a code change is likely to affect, which matters when a legacy test suite is large and slow.

What AI-augmented testing does not do is understand intent. It can tell you what a system currently does. It cannot tell you what a system is supposed to do, or whether current behaviour is actually a long-standing bug. That distinction shapes almost everything else in this article.

Why does regression testing become the bottleneck in modernisation projects?

Regression testing dominates modernisation timelines because legacy systems rarely have adequate test coverage to begin with. Teams inherit undocumented business logic, tightly coupled modules, and behaviour that only the system's original authors fully understood — so every change carries the risk of breaking something nobody remembered was connected.

This is the core problem the strangler fig pattern is designed to manage: incrementally replacing legacy functionality while the old and new systems run side by side. But incremental replacement only works if you can verify, quickly and repeatedly, that each slice of replaced functionality behaves the same way. Without automated regression coverage, teams either slow down modernisation to manually re-test everything, or they accept risk they cannot quantify. Neither is a good position for an engineering leader to be in, and it is one of the reasons application modernisation engagements start with an honest audit of existing test coverage before any code is touched.

Where are AI-generated tests reliable?

AI-generated tests are most reliable where the target behaviour is observable, repeatable, and reasonably well-bounded — think input/output pairs, API contract checks, and coverage of code paths that already execute in production. Tools that analyse existing code and traffic patterns can generate a first pass of unit and integration tests far faster than a human writing them manually, and they are genuinely useful for closing coverage gaps in legacy code that has none.

Low-angle view past a keyboard and monitor toward a standing engineer pointing at a screen showing test results, in a bright daylit office.

AI tooling also performs well at:

  • Generating boilerplate test scaffolding for well-defined functions and API endpoints
  • Identifying under-tested code paths by analysing coverage reports against code complexity
  • Producing synthetic test data that exercises edge cases in structure or format
  • Flagging likely regressions by comparing behaviour before and after a change, based on historical execution patterns

These are mechanical, pattern-matching tasks. AI models are good at them because they do not require understanding why the business logic exists — only that it exists and can be observed. This is the same reason AI performs well in AI engineering work more broadly: it excels at well-defined, observable tasks with clear feedback signals, and struggles where the correct answer depends on context the model was never given.

Where does human review remain essential?

Human review remains essential wherever a test needs to encode business intent rather than just observed behaviour — because AI models can only test what a legacy system currently does, not what it is supposed to do, and legacy systems are notorious for having quietly diverged from their original specification years ago.

View framed between two monitors of an engineer reviewing code on a laptop late in the day, lit by screen glow and a warm desk lamp in a dim office.

This distinction matters more than it sounds. If a legacy billing system has a bug that under-charges a specific customer segment, an AI-generated regression test built purely from observed behaviour will happily encode that bug as "correct" and flag any fix as a regression. A human reviewer with domain context is needed to tell the difference between behaviour that must be preserved and behaviour that should be corrected during modernisation.

Human review is also non-negotiable for:

  • Compliance-critical logic, particularly in regulated sectors like financial services, insurance, and healthtech, where test intent needs to map to a specific regulatory obligation, not just an observed output
  • Edge cases and exception handling that occur rarely enough that AI models may not have seen sufficient examples
  • Test cases that verify security controls, authentication, and access boundaries
  • Any test suite that will be relied on as the primary evidence a migration is safe to ship

Software quality standards such as ISO/IEC 25010 frame testing around characteristics like functional suitability and reliability — categories that require someone to define what "correct" means before any tool, human or AI, can verify it.

How should engineering teams structure an AI-assisted testing strategy?

The most effective approach treats AI as a force multiplier for test creation and maintenance, with humans retaining ownership of test intent and sign-off — not as an autonomous QA function. In practice, that means using AI-generated tests to rapidly build baseline coverage over legacy code that has little or none, then having engineers with domain knowledge review that baseline before it becomes the reference point for a migration. It means letting AI tools flag likely regressions and prioritise which tests to re-run on a given change, while leaving the judgment call — is this a regression or a fix? — with a human. And it means being explicit, in compliance-sensitive domains, about which test suites are AI-assisted and which require documented human sign-off as part of the audit trail.

This is also where test strategy connects back to product decisions. If a modernisation programme is a precursor to introducing AI features into the product itself, the same discipline about intent versus observed behaviour shows up again — which is one reason we treat AI product strategy and modernisation planning as related conversations, not separate projects. Teams that get the testing foundation right during modernisation tend to have an easier time validating AI features later, because they already have the habit of separating what a system does from what it should do.

AI-augmented testing is a genuine productivity gain for modernisation programmes carrying legacy code with thin test coverage. It shortens the time between making a change and knowing whether it broke something. It is not, and should not be treated as, a replacement for engineers who understand what the system is meant to do. Teams that get the split right — AI for mechanical test generation and regression detection, humans for intent and sign-off — move through modernisation faster without trading away confidence in what they ship.

For more on how we think about this in practice, see more insights from our modernisation and AI engineering work, or get in touch to talk through where AI-assisted testing could fit into your own modernisation plans.

Share

Chris Kerr

Partner at Horizon Labs, an AI product consultancy and venture studio. A commercially focused product and technology leader with 20+ years building and scaling digital platforms, teams, and businesses across SaaS, travel, eCommerce, logistics and transport, and digital marketing — operating at the intersection of product, engineering, and data. Writes about platform strategy, AI transformation, modern data ecosystems, and the operational discipline that separates AI demos from AI products.