[ http://jira.codehaus.org/browse/MSUREFIRE-134?page=comments#action_68466 ]
Jesse Kuhnert commented on MSUREFIRE-134: ----------------------------------------- Damn my luck. I seem to be hitting the same wall. I have debugged the problem extensively and find that it is probably the result of something weird happening in the classpath. The issue is that TestNG will do a Class.getAnnotation(<class annotation type>) on the classes to find methods/config/etc...For whatever reason the classes loaded via maven don't return annotations when this method is called. I have however been able to list the annotations via Class.getDeclaredAnnotations()...They are actually listed fine but won't match via normal equality checking because they are only proxy classes for some reason. If you try to take one of the annotations in generic form and cast it to the actual class you get a runtime error of "$Proxy4" (or whatever it is in your jvm ) can't be cast to blah blah. I'll have to see if anyone else can help me debug, but all of the annotation based unit tests (well mostly all) for jdk1.5 in TestNG are passing and working normally. > Surefire finds test classes but ignores test methods and configuration > methods with TestNG and includes tag > ----------------------------------------------------------------------------------------------------------- > > Key: MSUREFIRE-134 > URL: http://jira.codehaus.org/browse/MSUREFIRE-134 > Project: Maven 2.x Surefire Plugin > Type: Bug > Versions: 2.2 > Environment: Maven 2.0.4 > Surefire Plugin 2.2 > TestNG 4.7 jdk15 (using annotations) > Sun JDK 1.5_06 > Windows XP SP 2 > Reporter: Mark Reynolds > Attachments: maven2-testng.zip > > > Attachment contains 2 projects which are identical except for how the test > cases are referenced. In one project they are referenced via a suite xml > file. In the second they are referenced using the includes tag. I believe > they should produce identical results. > Both projects find all 6 test classes, but only the one using a suite xml > file actually executes the configuration methods and test methods. The > project using an includes tag completely ignores the configuratiion methods > and test methods. -- 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