Wednesday, January 12, 2005

TestNG Article

An updated from Good-bye JUnit, an article from IBM's developerWorks TestNG makes Java unit testing a breeze: "Some peculiar features of JUnit come in for particular criticism from the latter group:

* The need to extend a TestCase class, because the Java language has single inheritance, is very limiting.
* It is impossible to pass parameters to JUnit's test method as well as to setUp() and tearDown() methods.
* The execution model is a bit strange: The test class is reinstantiated every time a test method is executed.
* The management of different suites of tests in complex projects can be very tricky."

"All these features, together with the adoption of Java annotations to define tests, make the whole testing process much more simple and flexible. There are only a few rules that you must obey to write tests; beyond these, you are absolutely free to choose the testing strategy you prefer."
Post a Comment