Last year, I was maintaining the J2EE application I had developed. Hence there was not much new things to learn in terms of the technology. Hence we started focusing on the Unit testing.
We moved to Agitar framework to help in our unit testing crusade. We were using JUnits before.
Agitator is a powerful tool. It generates the Junit test cases from your code. Also it generates powerful test cases in its own propritary format. It reads the code and suggests assertions that it observes from running a unit of method. For the first time it generates the data for the unit. If it is not able to generate the data or if we need more precise data we can assist it by specifying the data range or type. We can do this by providing mock classes and factories. It is powerful on these fronts. Also one place where it helps very much is that it identifies any uncaught error scenarios like Nullpointer, ArrayIndexOutOfBounds, ClassCast exception etc.
The developer will have a learning curve initially. But once he believes it and appreciates it, the benefits are good. It forces you to write yur methods following good test driven proniciples. If you have not done it that way, you will have a hell of a time testing a single method.
It will be more easier to test three methods each of 20 line size than to test a single method of 60 line size. Although this is a basic software engineering concept that with the cyclomatic complexity being increased your test case complexity is increased exponentially, due to agitars coverage analysis, we can catch it real time in the dash board for managers if the method is not completely tested.
For more information on the tool refer www.agitar.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment