@AfterClass dependsOnMethods raises SurefireExecutionException: is depending on 
nonexistent method
--------------------------------------------------------------------------------------------------

                 Key: SUREFIRE-496
                 URL: http://jira.codehaus.org/browse/SUREFIRE-496
             Project: Maven Surefire
          Issue Type: Bug
          Components: TestNG support
    Affects Versions: 2.4.2
         Environment: Windows XP
testng 5.7
maven-surefire-plugin 2.4.2
            Reporter: Samatha Sung


Hi,

I got this exception
"org.apache.maven.surefire.booter.SurefireExecutionException: 
myTest.tearDown() is depending on nonexistent method myTest.testMethodA; nested 
exception is org.testng.TestNGException: 
myTest.tearDown() is depending on nonexistent method myTest.testMethodA
org.testng.TestNGException: 
myTest.tearDown() is depending on nonexistent method myTest.testMethodA"

when I use "dependsOnMethos" on @AfterClass. It passes when I change it to 
@Test. However, this is only a hack. I want it to be @AfterClass.

This is my test:
@Test(sequential=true)
public class myTest {
        @Test (enabled=true, groups={"xxx"}, dependsOnGroups={"yyy"})
        public void testMethodA() throws Exception {
        ...
        }
        
        @AfterClass(enabled=true,groups={"xxx"}, 
dependsOnMethods={"testMethodA"})
        public void tearDown() throws Exception {
        ...
        }


Thanks,
Sam-


-- 
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

        

Reply via email to