Gili created SUREFIRE-931:
-----------------------------
Summary: Surefire crashes if test depends on unknown group
Key: SUREFIRE-931
URL: https://jira.codehaus.org/browse/SUREFIRE-931
Project: Maven Surefire
Issue Type: Bug
Components: TestNG support
Affects Versions: 2.12.4
Reporter: Gili
Attachments: TestFailed.zip
Unzip and run the attached testcase.
Surefire throws the following exception:
{code}
Configuring TestNG with:
org.apache.maven.surefire.testng.conf.TestNG652Configurator@6127ffd7
org.apache.maven.surefire.util.SurefireReflectionException:
java.lang.reflect.InvocationTargetException; nested exception is
java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: org.testng.TestNGException:
DependencyMap::Method "AppTest.removeNonExistentLocation()[pri:0,
instance:null(com.mycompany.testfailed.AppTest)]" depends on nonexistent group
"getLocation"
at
org.testng.DependencyMap.getMethodsThatBelongTo(DependencyMap.java:45)
at org.testng.TestRunner.createDynamicGraph(TestRunner.java:1079)
at org.testng.TestRunner.privateRun(TestRunner.java:734)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
at
org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110)
at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
... 9 more
{code}
and prints:
"The forked VM terminated without saying properly goodbye. VM crash or
System.exit called ?"
Expected behavior:
# Kill this misleading error message, please. I wasted a lot of time looking in
the wrong direction because of it.
# Surefire should report this as a normal test failure, not a crash.
See http://netbeans.org/bugzilla/show_bug.cgi?id=219097 for a related
discussion.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira