Stop Fearing Mainframe Spaghetti Code with Compuware Topaz for Total Test
Overview: Learn how Compuware’s automated testing tool, Topaz for Total Test, can help mainframe teams handle spaghetti code by gaining new visibility into large, complex codebases.
There is one colorful term that strikes fear into the heart of every mainframe professional: spaghetti code.
Because many mainframe programs in production today have been running for years, they have grown through accretion.
As every new requirement comes along, some courageous developer adds some new code to the existing codebase. Repeat many times over the decades, and the result is a monstrosity of an application with so many addons by so many people that no one has any idea how the whole thing works anymore.
There are other causes of the spaghetti code problem as well. Sometimes, the original application architecture dates from the primordial era of computer programming. GOTO statements abound. Global variables flow like water. Any modularity the code may chance to exhibit has little in common with modern modularization techniques.
Perhaps people have been adding to the application over the years as well, or perhaps not so much – but the lack of any modern organizing principles also relegates the application to the spaghetti code category.
A third trend that may include either of the ones above, but can lead to the spaghetti problem all on its own: sheer size. Even well-organized, modular code can be intractable for new developers to maintain when the lines of code number in the millions or more.
Regardless of its cause, the spaghetti code problem – or in many cases, simply the fear of spaghetti code – can stop a modernization effort in its tracks.
Fortunately, there’s a solution.
A Modern Look at Modernization
For many years, IT leadership has had two choices for how to modernize spaghetti code apps: either replace the entire thing, or simply leave it alone, and focus modernization efforts on technologies outside the mainframe.
Typically, neither option met the business need, as much of what such applications did was still valuable, or even mission-critical, to the business – just not all of each application.
The good news: we have many more options than we did in past years. Today’s cutting-edge software tools empower a new generation of mainframe professionals to carve out an additional modernization option: modernize in place.
In order to modernize a spaghetti code application in place, developers must first be able to get a handle on it. They must achieve an understanding of the overall structure of such applications, including areas that are still providing adequate performance, and which parts of the application need updating or replacement.
The most important tool for achieving such visibility in the face of updating spaghetti code applications, in fact, is automated testing.
Because automated testing provides visibility into the existing code base, it helps developers deal with increasing pressure to deliver software updates and additions faster without sacrificing quality.
Of course, such pressures exist for all developers, but on the mainframe, software development processes tend to be slower, and quality expectations are more stringent, especially in the face of spaghetti code.
Furthermore, even organizations with long-term mainframe commitments are increasingly lacking in mainframe expertise, as a new generation of less experienced mainframe developers gradually replaces the more senior staff – a new generation with neither the patience nor experience to slog through spaghetti code by hand.
This combination of modern pressures and younger developers doubles down on the need for automated testing – especially as their organizations move toward a collaborative DevOps software culture.
The Missing Piece: Compuware Topaz for Total Test
Topaz for Total Test from Compuware is a perfect example of an automated testing tool that can help today’s mainframe shop modernize its applications in place. The latest version of this product, in fact, speeds development while also increasing the quality of new and modified code.
Instead of focusing on manual testing tasks, developers can focus on the business value their software is supposed to deliver.
Topaz for Total Test automatically generates test cases as well as all data stubs necessary for testing. In fact, the more complex the program, the more essential such automatic generation becomes, as it is simply impractical to handle such tasks manually.
Compuware has put in a lot of effort to ensure that Topaz for Total Test is a fully modern tool. It creates and executes tests and evaluates the results across unit, functional, integration and regression testing.
Furthermore, the tool has a single, modern UI, and is able to import operational data in order to establish feedback loops that further improve code quality. And as you would expect, Topaz for Total Test features RESTful APIs, so that any CI/CD pipeline can automatically initiate tests or respond to their results.
The Intellyx Take
Because of the extensive automation capabilities in Topaz for Total Test, the more an application has grown over time – that is, the more spaghetti code it likely has – the easier it becomes for developers to deal with current and existing modifications to the code.
The big win, in fact, can be how Topaz for Total Test can help developers modularize the code, bringing order where there was none before. Such modularization can bring all the benefits of modern, object-oriented applications to be sure – but even more importantly, it can separate obsolete code from code that remains valuable to the organization.
Obsolete code, of course, has always been the bane of mainframe application modernization, because everyone is too afraid to pare it down for fear it’s not quite as obsolete as people presumed.
Only with the visibility and full-lifecycle testing of a tool like Topaz for Total Test can mainframe teams finally gain the courage they need to streamline and modernize the spaghettiest of code.
Copyright © Intellyx LLC. Compuware is an Intellyx customer. Intellyx retains final editorial control of this article.
This post originally appeared on the Intellyx blog.