With the release of AgitarOne 4.2, Agitar is helping to relieve the task of unit testing Java code. Out of the box, the company says with AgitarOne development teams can generate a basic set of unit tests that provide 80% code coverage across the project in a matter of hours.
Not only that, but the product also tests legacy code that many times is in everything a company runs. Alberto Savoia, CTO of Agitar, said this is a huge service to organizations that cannot be flexible and cannot handle the risk of changes to the software.
"Because of the restrictions of legacy code, they spend their time maintaining that code and they don't have the freedom to do new things," he said. AgitarOne gives them a way to test legacy code, which also enables them to be more agile, Savoia added.
"The focus is on helping companies deal with their worst code," he said. "It's a very needed thing to do."
Carey Schwaber, senior analyst, Application Development at Forrester Research, praised AgitarOne's ability to create unit tests for legacy applications.
"A tool like AgitarOne that generates JUnit unit tests is, in my view, the only feasible way to secure a suite of unit tests for legacy Java applications," she said. "The only other alternative is to build up that suite of unit tests over time as you perform maintenance on the application, adding unit tests to the code that you're working with."
Savoia said AgitarOne helps a business be agile because it enables companies to change the code and make sure that the change doesn't break something else.
"It's very easy to add business functionality and break things," he said. "To be agile you need to be able to make a change and not break anything. The only way to do that is to have tests."
AgitarOne, which used to offer 50 to 60% code coverage, is able to provide 80% now because it tests code that was previously could not be tested, Savoia said.
"We've leveraged the concept of mocking so that if we have a heavyweight component, such as a database, servers the Internet or anything that has to do with a file system, we can simulate it without having to have the component on the other end," he said.
Savoia added that Agitar guarantees 80% code coverage. "We've been proving it and testing it ourselves. We give customers the proof," he said. "We will discount up to 20% if a customer can't get to 80 percent."
Another significant advance in AgitarOne 4.2 is the speed at which the product works. Because of its highly scalable, server-based architecture, Savoia said the tool can generate 250,000 lines of JUnit per hour. "We do it faster than anybody else," he said.
How AgitarOne compares
In terms of other unit testing products, Savoia says, "there's nothing that even comes close. No one can give the same guarantee."
Schwaber said the only other tool she knows of that generates JUnit tests is Parasoft JTest, but "it is more of a generalist developer testing tool than a focus unit testing tool."
"I don't believe that Parasoft has a coverage guarantee for the JUnit test cases that it generates," she said. "There are, of course, lots of other unit testing tools, but they're all open source ports of the open source JUnit testing tool, which is essentially a testing framework that Agitar leverages."
Tool not a cure-all
While automated testing can help in the development of software, Savoia warned against relying on it solely. "People should not look at our tool and say we should fire our QA staff," he said.
AgitarOne actually helps the QA staff do their jobs, he said, by making sure the code is as free of bugs as possible when it gets to them.
"The problem many times is when the code gets to QA, it's filled with bugs that cause them to stop and start over and over and [the QA engineers] can't do what they're supposed to. We remove the drudgery," Savoia said.