'. '

TestNG

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(I wouldn't mind referring to testing.com, if the website had some content)
Line 1: Line 1:
-
[[wikipedia:TestNG|TestNG]] is a testing harness created to improve [[JUnit]]3 experience. When it seemed it will take over the testing unit market the [[JUnit]] released version four, which basically copied the [[TestNG]] design.
+
[[wikipedia:TestNG|TestNG]] is a testing harness created to improve [[JUnit]]3 experience. Tests can be annotated with [[annotation]]s and as such the design looked more modern when [[Java]]5 (and support for [[annotation]]s was new). For a while it seemed [[TestNG]] will take over the [[Java]] testing market. It was new, slick and it offered a way to execute [[JUnit]]3 tests.
 +
 
 +
However the [[JUnit]] guys stroked back by creating [[JUnit]]4, which basically copies the way [[TestNG]] uses [[annotation]]s. As such those who had previous investments in [[JUnit]]3 could just upgrade to [[JUnit]]4, keep [[BackwardCompatibility|compatibility]] and offer [[annotation]]s to those who wished to be ''free-cool-in''. Since then the adoption of [[TestNG]] slowed down, at least from point of me, an external observer.
 +
 
 +
Still there are reason to use [[TestNG]]. [[JUnit]] project decided to stick with [[CPL|archaic license]], long time supersceeded by [[EPL]], and at least [[Oracle]] is not comfortable with redistributing software [[CPL|under such license]]. [[TestNG]] comes with widely accepted [[Apache]] license.
 +
 
 +
Also [[JUnit]] claims to support primarily ''unit'' testing. Sometimes it leads to [[OrderOfElements|ridiculous stories]] when [[JUnit]] projects decides to prefer enfocing test isolation even it leads to irreproducible random test failures (probably to be [[OrderOfElements#Happy End|resolved in next version]]). Thus when you mean more than ''just unit testing'', [[TestNG]] can still be viable alternative.

Revision as of 08:02, 24 February 2012

TestNG is a testing harness created to improve JUnit3 experience. Tests can be annotated with annotations and as such the design looked more modern when Java5 (and support for annotations was new). For a while it seemed TestNG will take over the Java testing market. It was new, slick and it offered a way to execute JUnit3 tests.

However the JUnit guys stroked back by creating JUnit4, which basically copies the way TestNG uses annotations. As such those who had previous investments in JUnit3 could just upgrade to JUnit4, keep compatibility and offer annotations to those who wished to be free-cool-in. Since then the adoption of TestNG slowed down, at least from point of me, an external observer.

Still there are reason to use TestNG. JUnit project decided to stick with archaic license, long time supersceeded by EPL, and at least Oracle is not comfortable with redistributing software under such license. TestNG comes with widely accepted Apache license.

Also JUnit claims to support primarily unit testing. Sometimes it leads to ridiculous stories when JUnit projects decides to prefer enfocing test isolation even it leads to irreproducible random test failures (probably to be resolved in next version). Thus when you mean more than just unit testing, TestNG can still be viable alternative.

Personal tools
buy