With testng, incorrect test numbers are reported if setup method throws exception. ----------------------------------------------------------------------------------
Key: MSUREFIRE-140 URL: http://jira.codehaus.org/browse/MSUREFIRE-140 Project: Maven 2.x Surefire Plugin Type: Bug Versions: 2.2 Environment: Maven 2.0.4 Java 1.5.0_06 Windows XP Reporter: Mark Reynolds Priority: Minor Attachments: project.zip If an exception is thrown in a testng setup method, the testing related numbers displayed by the plugin are incorrect. For example... Run a build with a single testng test class with three tests. If everything passes, the output looks like this: ------------------------------------------------------- T E S T S ------------------------------------------------------- Running mypackage.TestClassOne Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec Results : Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 If the same test class throws an exception in the setup method [annotated with @Configuration(beforeTestMethod=true)], the output looks like this ------------------------------------------------------- T E S T S ------------------------------------------------------- Running mypackage.TestClassOne Tests run: 6, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 0.156 sec <<< FAILURE! Results : Tests run: 6, Failures: 1, Errors: 0, Skipped: 5 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira