Unit Testing Gets A Boost With ARCAD
June 8, 2020 Alex Woodie
“If you can’t measure it, you can’t improve it.” The famous management consultant Peter Drucker said those words to relate his philosophy on achieving business success. He didn’t know it at the time, but they would also apply to software development, including the testing of software, which is an area that ARCAD Software knows a thing or two about.
ARCAD Software has been a leader in IBM i testing for many years. It started with Verifier, the company’s flagship regression testing tool, which forms a part of its suite of DevOps tools for IBM i. Verifier helps developers ensure that the functionality of applications is up to expectations, especially after changes have been made. The software was designed to manage the full testing campaign, including recording test scenarios and managing data for the test.
In 2018, ARCAD augmented the flagship Verifier tool with a unit testing tool, called iUnit. Modeled after the Java unit testing tool Junit, iUnit was created to help RPG, CL, COBOL, and other developers ensure that smaller portions of an overall application, such as procedures, functions, and service programs, are working as advertised before promoting the code into production, as opposed to testing the full application (which is what Verifier is designed to do).
ARCAD recently announced a major update to iUnit that should make the software easier to use. Instead of requiring users to manually enter the input and output parameters that define the iUnit tests, the tool now includes a “discovery engine” that automatically finds the required parameters for the user and enters the values into the system for testing purposes.
This automated approach to defining the terms of success and failure based on parameter values will help increase the productivity of IBM i developers and testing personnel, says Phillipe Magne, the CEO of ARCAD Software.
“With ARCAD iUnit any developer can execute a unit test in a single click from RDi, for every code change,” Magne states in a press release. “This means that any offending code lines are detected instantly and they can be fixed before they leave the hands of the developer.”
Unit testing typically is employed by developers as they write the code, but they can also be used later to regression test or “smoke test” an application as further modifications are made, Magne says. This dual-pronged testing approach brings benefits all along the development continuum.
“They not only improve the reliability of code in the long term, but they encourage clarity and simplicity in code design,” Magne continues. “Consistent use of unit testing reduces the mean time to repair and technical debt overall.”
Like Verifier, iUnit keeps a history of test performance, allowing developers to monitor the progress (or lack thereof) over time. Tests can be saved, and even exported for use on other systems. Also like Verifier, iUnit includes built-in code coverage, which allows developers to see what percentage of code has been executed by a test, which can help them plan future tests.
iUnit integrates with software change management (SCM) solutions and test repositories, including Git repositories. The software works with JUnit, allowing users to standardize their unit testing across other platforms. And it hooks into Jenkins for continuous integration, continuous delivery (CI/CD) processes.
“Some IBM i practitioners underestimate the value of unit testing due to the development effort involved,” Magne says. “That is why it was so important for us to aim for the highest possible level of automation in the creation and launch of unit tests. We built ARCAD iUnit to integrate in any standard DevOps stack, so that IBM i unit tests can be launched from Jenkins and stored in Git.”
The Software Engineering Institute estimates that the cost of a single defect is about $1,000 when caught during the regression testing phase of the project, according to Magne. The costs go up as defects are detected further along in the DevOps process.
“Now with ARCAD iUnit our clients can prove a huge ROI as they discover defects early in the unit testing phase where the cost averages $100 to fix,” Magne says.
Even Peter Drucker would approve of that.
RELATED STORIES
ARCAD Brings Traditional 5250 Development Into DevOps Fold