Exception in TestNG plugin

If I use dependsOnMethods for @Test, plugin give me follwing information. Code as following:
@Test
public void first()
{
System.out.println("first");
}
@Test(dependsOnMethods = {"first"})
public void testCount()
{
System.out.println("count");
}


org.testng.TestNGException:
unitest.com.alibaba.TestNGTest.testCount() is depending on nonexistent method unitest.com.foobar.TestNGTest.first
at org.testng.internal.MethodHelper.findMethodsNamed(MethodHelper.java:165)
at org.testng.internal.MethodHelper.topologicalSort(MethodHelper.java:494)
at org.testng.internal.MethodHelper.sortMethods(MethodHelper.java:568)
at org.testng.internal.MethodHelper.collectAndOrderMethods(MethodHelper.java:82)
at org.testng.internal.MethodHelper.collectAndOrderMethods(MethodHelper.java:50)
at org.testng.TestRunner.initMethods(TestRunner.java:340)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.init(TestRunner.java:173)
at org.testng.TestRunner.]]>(TestRunner.java:139)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:102)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:152)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:483)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:234)
at org.testng.SuiteRunner.run(SuiteRunner.java:190)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:993)
at org.testng.TestNG.runSuitesLocally(TestNG.java:957)
at org.testng.TestNG.run(TestNG.java:724)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Please sign in to leave a comment.