I have recently wanted to study some Java unit test tools. At present, the mainstream commercial unit test tools in the market have mainly Jtest and Agitator. Other may be unparalleled, and I am not very clear. Below, these two tools are compared, of course, I don't use it deeply.
1, code rules check
(1), Jtest
I think the main feature of Jtest is mainly its code rules, and it is very powerful and can define code rules themselves to adapt to this team, and even the company's development specifications. Its rulewizard features are very characteristic. Just like the latest Jtest 7.5 evaluation version seems to take RuleWizard, you can copy the rulewizard in the previous version to a directory in Jtest 7.5, or you can use. This should change in various versions. Also mentioned is that Jtest's evaluation version does not support GBK and other character sets. I confirm that it is a Chars.jar file that is missing a JDK1.5 in Jtest, as long as copying.
Also, since JTEST code rules check the time consumption, it can be combined with Rational Robot, allowing it to automatically run and automatically generates a report for code check. Of course, you can also generate such a report in combination with tools such as CruiseControl, Ant.
(2), agitator
Compare the friendliness and convenience of the overall interface of the code rules of Agitator, it is worse than Jtest. Of course, it also provides integration with CruiseControl, Ant, etc., or automatically generates reports.
(3), small knot
Check this block in code rules, Jtest has to have a certain advantage. Of course, because agitator is an emerging tool, many of the market tests, I think this Agitator will increase in the future.
2, unit test
(1), Jtest
Now the unit test of each version of JTEST is automatically generated a JUnit unit test case, and Jtest has extends to JUnit, which has added some own features. However, due to the automatic generation unit test case, most of the test cases have no value for developers, so it can be said that the automatically generated unit test case is basically no value.
In Jtest7.5, I found a new feature, which is the user-defined unit test case, but the interface is not very convenient. Very a bit similar to the C unit test tool VisualUnit launched by a company in China. But in general, it also needs to be greatly improved. After all, for unit testing, it is convenient for programmers to carry out unit tests, and substantially saving programmers time tools are the development direction. Because for a project, the construction period is very tight. If you need to write 2 to 5 times unit test code, it takes too much item time, especially for domestic software environments.
(2), agitator
The agitator is very convenient. Basically, the program personnel do not need to write the JUnit unit test case. Mainly for simple interface operations, you can complete unit testing. This is very attractive to programmers. As long as you fill in blank, you can complete Unit testing is too wonderful. In addition, the main feature of Agitator is its expert function, providing some common tools such as Spring, Hibernate, etc., which is very convenient, and applied MOCK ideas. There is also a feature that the custom unit test is more convenient, you can use a variety of ways, lists, and more.
(3), small knot
In terms of unit testing, Agitator has a certain advantage, which may be some unit test master characters, such as Kent Beck, etc. 3, report function and management control
(1), Jtest
Jtest itself does not provide reporting function, but an additional purchase of the company's GRS to provide, I think this is an extra investment, I think GRS should be bundled with Jtest, should not be independent. The overall function of GRS is relatively strong, I am trial of GRS1.0 version, now the new version does not provide download, and GRS is more difficult to configure, and the interface is not very friendly. I suggest that the way Eclipse RCP is better than that of Jtest is tightly integrated.
(2), agitator
Dashboard is more convenient, can be integrated with tools such as CruiseControl, Ant. More convenient.
(3), small knot
Both are not divided.
4, the two defects
Both do not know the unit testing of the interface, such as AWT / SWING, SWT, etc. This is the need to improve.
5 Conclusion
From the unit test perspective, I tend to use agitator.