3 Replies Latest reply on Feb 21, 2013 7:17 AM by Dominik Grupp

    arquillian test successful via eclipse but does not even run on command line

    Dominik Grupp Newbie

      Hi,

       

      a simple dao test runs successful when executed via eclipse indigo (run as > JUnit test) but does not run when executed as "mvn test" with the following exception. Why?

       

      I tried to understand the code in the mentioned class but don't (org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:245))

       

      Running de.as24.dao.billing.AccountStateDaoTest
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.003 sec <<< FAILURE!
      checkItOut(de.as24.dao.billing.AccountStateDaoTest)  Time elapsed: 2 sec  <<< ERROR!
      java.lang.NullPointerException
                at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:245)
                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)
                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                at java.lang.Thread.run(Thread.java:662)
      
        • 2. Re: arquillian test successful via eclipse but does not even run on command line
          Dominik Grupp Newbie

          Please find enclosed the zipped and targz project (same content). It contains only src directories and poms without .classpath etc. This is the skeleton and copy only of the project (from work). It should throw the exception when executing the test with

           

          mvn test -Parquillian-jbossas-managed
          

           

          I created and compiled this skeleton at home and here I could not execute the test within eclipse because it would continously give me

           

          org.jboss.arquillian.container.spi.ConfigurationException: jbossHome 'null' must exist
          

           

          although I do have an arquillian.xml properly configured. However, on the command line the exception was reproducable.

          • 3. Re: arquillian test successful via eclipse but does not even run on command line
            Dominik Grupp Newbie

            The problem was the following part:

             

            <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-surefire-plugin</artifactId>
                      <version>2.12.3</version>
                      <configuration>
                                <parallel>methods</parallel>
                                <threadCount>10</threadCount>
                                <skip>false</skip>
                      </configuration>
            </plugin>
            

             

            which we changed into

             

            <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-surefire-plugin</artifactId>
                      <version>2.12.3</version>
                      <configuration>
                                <forkMode>perTest</forkMode>
                                <skip>false</skip>
                      </configuration>
            </plugin>
            

             

            Seems Arquillian cannot run tests in parallel.