-
1. Re: Suite of arquillian tests does not pass. Individual tests do. Why?
aslak Dec 28, 2011 1:47 PM (in response to hpgisler)Do you have the stack trace to that exception? It can be thrown from multiple locations..
-
2. Re: Suite of arquillian tests does not pass. Individual tests do. Why?
hpgisler Dec 29, 2011 3:27 AM (in response to aslak)Hi Aslak, sorry, I totally forgot - and thanks for your fast reply.
Here is the stack trace:
{code}
loggerInjectionTest(com.example.ArquillianBasicEnterpriseArchiveTest) Time elapsed: 0.006 sec <<< FAILURE!
java.lang.IllegalStateException: No TestRunnerAdaptor found, @BeforeSuite has not been called
at org.jboss.arquillian.testng.Arquillian.verifyTestRunnerAdaptorHasBeenSet(Arquillian.java:246)
at org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:154)
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.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:191)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:666)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1147)
at org.testng.TestRunner.privateRun(TestRunner.java:749)
at org.testng.TestRunner.run(TestRunner.java:600)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
at org.testng.SuiteRunner.run(SuiteRunner.java:223)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
at org.testng.TestNG.run(TestNG.java:900)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:122)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105)
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:188)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
{code}
-
3. Re: Suite of arquillian tests does not pass. Individual tests do. Why?
john.genoese Jul 25, 2012 8:43 PM (in response to hpgisler)Are you perchance using the Groups facility?
If so, you need to know that the Arquillian superclass we use for TestNG contains the @BeforeSuite(groups="arquillian") annotation. This means that you must either include the group "arquillian" in any "groups" list (i.e. Maven <groups> ), or ensure that it is omitted from any "excludeGroups" list (i.e. Maven <excludeGroups>).
Here's an set of examples that illustrates what I mean:
<profiles>
<profile>
<id>Integration</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<configuration>
<groups>arquillian, Integration</groups>
<reportsDirectory>target/integration-surefire-reports/</reportsDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>Unit</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<configuration>
<groups>Unit</groups>
<reportsDirectory>target/surefire-reports/</reportsDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>All</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<configuration>
<groups>Unit, arquillian, Integration</groups>
<reportsDirectory>target/surefire-reports/</reportsDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
-
4. Re: Suite of arquillian tests does not pass. Individual tests do. Why?
sathiyaseelan Feb 4, 2013 7:51 AM (in response to john.genoese)Hi I have the same problem..It works when i added "arquillian" into my group list
thks John
-
5. Re: Suite of arquillian tests does not pass. Individual tests do. Why?
razal-lister Nov 10, 2017 9:03 AM (in response to john.genoese)I have two group in the test class.
1. data-dependent
2. data-not-dependent
I was getting this error message "Error : java.lang.IllegalStateException: No TestRunnerAdaptor found, @BeforeSuite has not been called" and later adding arquillian in maven groups solved above errors.
It is executing all groups test instead of which I specified in maven group tag.
<groups>data-dependent,arquillian</groups>
TestClass has 4 test method out of which 2 belongs to data-dependent and other to belongs to data-not-dependent test.
When I tried to run suite, it was executing all four methods instead of two method which belongs to data-dependent group