A major cloud migration project
This US Aerospace and Defense company (‘the Company’) needed to modernize a large, business-critical Java application. The application was created over 35 years ago and consists of over 1 million lines of complex, highly specific code; strict quality guidelines made on-time project delivery a challenge.
The goal of the modernization project is to improve user experience by implementing a Java web interface for the existing back-end system, and align with a strategic direction of hosting core systems in the cloud. The two applications will be moved to the cloud once development work is complete, but an 80% unit test coverage gate - designed to help maintain operational continuity - must be met and maintained for a successful migration.
A difficult coverage question
This presented the Company with a difficult question: how to increase unit test coverage to the level required quickly enough to meet the project deadlines, and then maintain it?
It was immediately clear human effort alone couldn’t be the answer. The team of highly experienced specialist developers working on the application had neither the bandwidth nor appetite to write all the unit tests that would be needed. Relying on new developers wasn’t practical either: even if enough experience could be found, they would take too long to get up to speed on this challenging codebase.
Meanwhile, unit tests are also needed for the new web front end; a comparatively small task, but another demand on valuable developer time.
The Company began to search for a tool that could help them to quickly write unit tests at scale without expanding the development team.
It was immediately clear human effort alone couldn’t be the answer.
Automated unit test writing with Diffblue Cover
Diffblue Cover gave the Company the capability they needed. Cover enables them to write a high volume of consistent, human-readable, compilable Java unit tests completely automatically, even on undocumented legacy code. Perhaps more important, it operates autonomously without the need for human input, reducing the demand for valuable development resources.
The development team tried various versions of Cover to understand the product’s capabilities. The free Community Edition demonstrated how it works in the IntelliJ desktop IDE, before a trial of the Command Line Interface version showed how it can write tests at scale. Like most users with large codebases, however, the Company quickly realized the fully featured Enterprise Edition of Cover would best suit their needs.
During onboarding the Diffblue team worked closely with the Company’s project lead and the application developers. Weekly surgery sessions, alongside ongoing training and consultancy, ensured a smooth rollout of Cover.
2.5 years of manual effort saved
Cover quickly demonstrated its value by increasing unit test coverage significantly in the two project applications. Within a month almost 550,000 lines of code were covered by new unit tests - work that could take over two and a half years of effort for an average human developer.
The Company will use Cover to automatically write more unit tests as the project progresses, and is working closely with Diffblue’s Customer Success team on potential changes to the codebase and Cover’s AI that will extend coverage even further. Cover also provides the means to fully integrate unit test writing and maintenance into an automated CI pipeline, ensuring coverage levels can be automatically maintained as code evolves after the cloud migration is complete.
Thanks to Diffblue Cover the Company is better placed to meet the quality bar that has been set and successfully deliver an on-time modernization project, without demotivating or expanding the existing development team.