|
Page 1 of 6 When it comes to unit testing in java, one framework prominently comes in mind i.e. JUnit. But there's a new kid on the block that offers more. It's the JTiger Unit Testing Framework for Java 2 Standard Edition 1.5.
In this interview, Tony Morris, the creator of JTiger talks about unit testing, JTiger and how it is different from other unit testing frameworks - especially JUnit.
IndicThreads >> Hi Tony. It's a pleasure to have you on IndicThreads. A few words about yourself?
Tony Morris >> Gday. Im 27 years old and work for IBM Australia on the J2SE implementation. I am a keen proponent of software design techniques, and at times cause conflict in debates since I challenge orthodoxical beliefs ? (I can hear my colleagues chuckling in the background) primarily because I believe that what exists today is far from optimal. I spend a lot of my time discussing such topics of interest, when I should be getting serious and writing a book or something instead. I also spend spare time playing squash about 3 times a week and chess. When it comes to those all important pieces of paper, I have attained:
- Sun Certified Programmer for the Java 2 Platform (1.4)
- Sun Certified Programmer for the Java 2 Platform (5.0)
- Sun Certified Developer for the Java 2 Platform
- Bachelor of Information Technology
IndicThreads >> Could you tell us something about the JTiger framework you have created and why you felt the need for such a framework? Tony Morris >> The JTiger framework arose as a result of the many shortcomings of existing frameworks, the most obvious of which is JUnit. I felt the need for a few fundamental features of a test framework that were missing in existing frameworks, and a few more that would be nice to have for example, code coverage reporting would be an excellent integration.
"The JTiger framework arose as a result of the many shortcomings of existing framework...."
I see JUnit as not much more than a glorified if/else construct i.e. assertTrue and assertFalse, or to steal Martin Fowlers terminology, an anaemic domain model. JTiger also proves itself as a valid framework by providing its own self-tests, with high coverage metrics. The expression syntax of JTiger also fits well with the preferred perspective of unit tests as a requirements specification for the software that is under test. For example, the following JTiger unit test can be interpreted in English as a test case that when 2 and 2 are applied as operands to the addition operator, 4 is the result.
"JUnit is not much more than a glorified if/else construct...."
@Test(addition) void addition() { assertEqual(2 + 2, 4); } There is a distinct one to one mapping between the English statement and the expression of the requirement as a JTiger unit test. I find this more natural, or as some of the users of JTiger put it, it just glides into place. It is the most accurate expression within the confines of the Java programming language, or at least, approaches it.
<< Start < Previous 1 2 3 4 5 6 Next > End >>
|