|
Installation and setup
AgitarOne is based on Eclipse IDE and it comes packaged with it. Alternatively, it can also be installed separately as a plug-in to an existing Eclipse IDE. In the packaged version, Tomcat server is automatically configured for AgitarOne and the client machines can access AgitarOne's Dashboard remotely.
Once the server and clients have been configured, it's just a few clicks of process for developers to automate the unit-testing process for their code modules.
The developer has to select his project or a class-file and through Agitar's drop-down menu he can select to create tests, agitate the code, run the code-rule or generate the Dashboard result of the project.
AgitarOne in action
The software agitates on a given code module to check for what that code was intended to do and what it actually does. Agitation can be described as a process of creating multiple instances of classes, and calling all methods of those classes with a wide array of input data and observing the results thus generated.
This input data can be randomly generated by AgitarOne or can be manually passed by the developer through factories (user-defined subclasses). Then it's up to the developer to check which observation forwarded by AgitarOne is not matching the desired behavior and the reason for it.
For experiencing this agitation process, let us take a sample project provided with AgitarOne. We will try agitating Product class and see the observations presented by AgitarOne, so that we are able to assert on a few of them to validate code behavior.
In the Product class, we have validation checks for name and price fields. Where name can't be more than 20 characters and price field can have a value between 0 and 1000.
To start the agitation process on Product class, select Product.java and click on Agitate toolbar button or press Ctrl+F9. Now, in the editor window for Product.java, we can see in the Code Coverage style the number of times a particular line of code has been executed. The red indicates that some lines have not been touched by control flow. In AgitarOne Server view, status and coverage (indicates what percent of the code lines have been executed) is displayed.
|