|
Page 5 of 6 Tony Morris >> The equivalent JUnit test would have the test case methods all beginning with test, and for the case of an expected exception, it would explicitly fail the test case if the exception didnt occur. Also, a JUnit test for the equals/hashCode implementations and serialization contract would be extremely painful to write without third party support. The important point here is that 100% coverage has been achieved over several passes with relatively minimal effort. The equivalent JUnit test case to achieve the same amount of coverage is extremely verbose and laborsome. "JTiger includes built-in reporting, in HTML, XML, plain text...."
JTiger includes built-in reporting, in HTML, XML, plain text, or your own implementation of the org.jtiger.framework.FixtureResultsHandler interface. Attached is the HTML report for the given example. IndicThreads >> JUnit has now been integrated with most Java IDEs and there are many other tools meant to simplify writing JUnit test cases. Is something similar happening with JTiger? There has been some mention by JTiger users to get together and write a JTiger plugin for both Eclipse and Intellij IDEA, but nothing has substantiated from it yet. Until then, I simply use the command line execution environment from within my preferred IDE so that I can take advantage of such features as debugging, etc. and I dont feel like Im missing out on anything by doing so. I have published instructions for doing this for Intellij IDEA here: http://www.jtiger.org/articles/jtiger-idea.html The same instructions could easily be applied to Eclipse, NetBeans or an environment of your choice. IndicThreads >> Because many Java users found JUnit inadequate to test web based / enterprise applications, we have seen the emergence of many frameworks that build on top of JUnit and simplify testing web/J2EE applications. What is JTiger's status as regards testing J2EE applications? Tony Morris >> I was working on implementing the J2EE specification at the end of last year (2004), where I used JTiger as a unit test framework for the work I was doing. At that time, JTiger was a prototype without a public release, and it met all my expectations in a J2EE environment. I also have a Java Questions and Answers database with a J2EE front-end application at http://qa.jtiger.org/. I wrote the application using the WebWork Model-2 web framework and Hibernate 3.x for data store and all components are tested entirely using JTiger. I know of quite a few users who work exclusively with J2EE and use JTiger for unit testing without any complaints. To answer your question, whether or not Im in a J2EE development environment, or J2SE, I choose JTiger as my unit test framework. I certainly have no compelling reason to do otherwise. JTiger is neutral in this respect. I have thought about extending some of the assertions for a J2EE specific domain. For example, wouldnt it be nice to write a JDBC 2.1 driver, then in your unit test, simply say: assertJdbc21Compliant(java.sql.Driver)? Ive also thought about doing something for the emerging EJB 3.0 specification.
|