9 Replies Latest reply on Mar 18, 2011 7:21 AM by kpiwko

    Arquillian + JSFUnit + Selenium

    stefanorg

      Hi all,

       

      i'm trying to run some example test, i've downloaded arquillian from the git repository and succesfully run the arquillian-seleniun extension test case, within eclipse with jboss-remote-6

       

      After that i'm trying to integrate arquillian with jsf-unit and run seleniun in a different test project so i've downloaded the gettingstart project of jsfunit from:

       

      http://anonsvn.jboss.org/repos/jsfunit/trunk/gettingstarted

       

      i've added this dependency to the pom.xml:

       

       <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-spi</artifactId>
                <version>1.0.0-20110303.090207-297</version>
                <type>pom</type>
                <scope>compile</scope>
          </dependency>
          <dependency>
                <groupId>org.jboss.arquillian.extension</groupId>
                <artifactId>arquillian-selenium</artifactId>
                <version>1.0.0-SNAPSHOT</version>
                <type>jar</type>
                <scope>provided</scope>
          </dependency>
          <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium</artifactId>
                <version>2.0b1</version>
                <type>jar</type>
                <scope>provided</scope>
          </dependency>
          <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-server</artifactId>
                <version>2.0b1</version>
                <type>jar</type>
                <scope>provided</scope>
          </dependency>
          <dependency>
                <groupId>org.jboss.arquillian.testenricher</groupId>
                <artifactId>arquillian-testenricher-resource</artifactId>
                <version>1.0.0-20110303.090631-273</version>
                <type>pom</type>
                <scope>provided</scope>
          </dependency>
          <dependency>
                <groupId>org.jboss.arquillian.testenricher</groupId>
                <artifactId>arquillian-testenricher-ejb</artifactId>
                <version>1.0.0-20110303.090547-275</version>
                <type>pom</type>
                <scope>provided</scope>
          </dependency>
      

       

      The arquillian-selenium extension is resolved from workspace in eclipse because i've not found it in a public repository, i'm new to maven so i don't know if this is a problem.

       

       

      the modified arquillian.xml:

       

      <arquillian xmlns="http://jboss.com/arquillian"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:jboss="urn:arq:org.jboss.arquillian.container.jbossas.remote_6"
                  xmlns:selenium="urn:arq:org.jboss.arquillian.selenium">
         <jboss:container>
            <jboss:remoteServerAddress>localhost</jboss:remoteServerAddress>
            <jboss:remoteServerHttpPort>8080</jboss:remoteServerHttpPort>      
         </jboss:container>
                <selenium:extension>
            <!-- a delay after each selenium command, it is overridden in system  properties -->
            <selenium:speed>5000</selenium:speed>
            <selenium:serverEnable>true</selenium:serverEnable>
         </selenium:extension>
      </arquillian>
      
      
      

       

      This is my HelloWorldSelenium class:

       

      import org.jboss.arquillian.api.Deployment;
      import org.jboss.arquillian.api.Run;
      import org.jboss.arquillian.api.RunModeType;
      import org.jboss.arquillian.junit.Arquillian;
      import org.jboss.arquillian.selenium.annotation.Selenium;
      import org.jboss.shrinkwrap.api.ArchivePaths;
      import org.jboss.shrinkwrap.api.ShrinkWrap;
      import org.jboss.shrinkwrap.api.asset.EmptyAsset;
      import org.jboss.shrinkwrap.api.spec.WebArchive;
      import org.junit.Test;
      import org.junit.runner.RunWith;
       i
      
      import com.thoughtworks.selenium.DefaultSelenium;
      
      
      @RunWith(Arquillian.class)
      @Run(RunModeType.AS_CLIENT)
      public class HelloWorldSelenium {
      
      
                @Selenium
                private DefaultSelenium driver;
      
                @Deployment
                public static WebArchive createDeployment() {
                          WebArchive war =
                                    ShrinkWrap.create(WebArchive.class, "test.war")
                                    .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"))
                                    .addPackage(Package.getPackage("org.jboss.jsfunit.example.hellojsf")) // my test package
                                    .addResource(new File("src/main/webapp", "index.xhtml"))
                                    .addWebResource(EmptyAsset.INSTANCE, "beans.xml")
                                    .addWebResource(new File("src/main/webapp/WEB-INF/faces-config.xml"), "faces-config.xml")
                                    .addManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
      
      
                          System.out.println(war.toString(true)); // for debugging
                          return war;
                }
      
      
                @Test
                public void test(){
                          driver.open("http://localhost:8080/test/index.faces");
                }
      }
      
      
      

       

      when i start the test i get this error:

       

      org.jboss.arquillian.impl.event.FiredEventException: java.lang.NullPointerException

                at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)

                at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)

                at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)

                at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:89)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)

                at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:32)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:41)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:31)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: java.lang.NullPointerException

                at org.jboss.arquillian.selenium.instantiator.SeleniumServerRunner.<init>(SeleniumServerRunner.java:57)

                at org.jboss.arquillian.selenium.event.SeleniumServerStartupHandler.callback(SeleniumServerStartupHandler.java:58)

                at org.jboss.arquillian.selenium.event.SeleniumServerStartupHandler.callback(SeleniumServerStartupHandler.java:1)

                at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)

                ... 21 more

       

      thanks for any help.

       

      I'm using jboss 6.0.0 Final

        • 1. Arquillian + JSFUnit + Selenium
          stefanorg

          no one can help?

           

          It seems that the SeleniumServerRunner.java has the configuration object at null, the constructor did not receive the right configuration

           

          public SeleniumServerRunner(SeleniumExtensionConfiguration configuration)

             {

                this.configuration = configuration;

                this.enabled = configuration.isServerEnable(); <-- null pointer here

             }

           

          i don't understand how to bring the right configuration ... the arquillian.xml file is present ... what i've to do?

           

          thanks

          • 2. Re: Arquillian + JSFUnit + Selenium
            kpiwko

            Hi Stefano,

             

            the problem is caused by Arquillian 1.0.0.Alpha4 dependency in gettingstarted example. As you already pointed out, arquillian-selenium extension was not released yet, and it is not compatible with Arquillian 1.0.0.Alpha4.

             

            The easist way how to overcome this limitation is to build Arquillian from sources:

             

             

            git clone https://github.com/arquillian/arquillian.git
            cd arquillian
            mvn clean install -DskipTests
            

             

            This will install artifacts into your Maven local repository, so you no longer have to point to Eclipse Workspace to retrieve arquillian-selenium.

            Then modify your pom file to point to 1.0.0-SNAPSHOT version and change scope of arquillian-selenium to <scope>test</scope> (pasting a part of modified gettingstarted pom.xml):

             

             

              <properties>
                  <version.jsfunit>2.0.0.Beta1</version.jsfunit>
                  <version.arquillian>1.0.0-SNAPSHOT</version.arquillian>
                  <version.jboss_60>6.0.0.Final</version.jboss_60>
               </properties> 
            
              <!-- Dependencies common to all containers -->
               <dependencies>
                  <dependency>
                     <groupId>javax.enterprise</groupId>
                     <artifactId>cdi-api</artifactId>
                     <scope>provided</scope>
                     <version>1.0-SP1</version>
                  </dependency> 
            
                  <dependency>
                     <groupId>junit</groupId>
                     <artifactId>junit</artifactId>
                     <version>4.8.1</version>
                     <scope>test</scope>
                  </dependency> 
            
                  <dependency>
                     <groupId>org.jboss.arquillian</groupId>
                     <artifactId>arquillian-junit</artifactId>
                     <version>${version.arquillian}</version>
                     <scope>test</scope>
                  </dependency> 
            
                  <dependency>
                     <groupId>com.sun.faces</groupId>
                     <artifactId>jsf-api</artifactId>
                     <version>2.0.4-b03</version>
                     <scope>provided</scope>
                  </dependency> 
            
                  <dependency>
                     <groupId>jboss.web</groupId>
                     <artifactId>servlet-api</artifactId>
                     <version>3.0.0-beta-2</version>
                     <scope>provided</scope>
                  </dependency>
            
            
                  <dependency>
                     <groupId>org.jboss.jsfunit</groupId>
                     <artifactId>jsfunit-arquillian</artifactId>
                     <version>${version.jsfunit}</version>
                     <scope>test</scope>
                  </dependency>
            
            
                  <!-- Selenium dependencies -->
                  <dependency>
                     <groupId>org.jboss.arquillian.extension</groupId>
                     <artifactId>arquillian-selenium</artifactId>
                     <version>1.0.0-SNAPSHOT</version>
                     <scope>test</scope>
                  </dependency>
                  <dependency>
                     <groupId>org.seleniumhq.selenium</groupId>
                     <artifactId>selenium</artifactId>
                     <version>2.0b1</version>
                     <scope>test</scope>
                     <exclusions>
                        <exclusion>
                           <groupId>org.testng</groupId>
                           <artifactId>testng</artifactId>
                        </exclusion>
                        <exclusion>
                           <groupId>org.hamcrest</groupId>
                           <artifactId>hamcrest-all</artifactId>
                        </exclusion>
                     </exclusions>
                  </dependency>
                  <dependency>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-simple</artifactId>
                     <version>1.5.10</version>
                     <scope>test</scope>
                  </dependency>
                  <dependency>
                     <groupId>org.seleniumhq.selenium</groupId>
                     <artifactId>selenium-server</artifactId>
                     <version>2.0b1</version>
                     <scope>test</scope>
                  </dependency> 
               </dependencies>
            

             

            This way example works with both JSFUnit and Selenium.

             

            Karel

             

            Fixed maven command line to skip tests execution

            • 3. Arquillian + JSFUnit + Selenium
              stefanorg

              Hi Karel,

               

              i'm trying to do what you suggest but i recive that:

               

              mvn -e -rf :arquillian-jbossas-managed-6 -DskipTest clean install

               

              [INFO] Error stacktraces are turned on.

              [INFO] Scanning for projects...

              Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/css/core/maven-metadata.xml

              Downloading: http://repository.jboss.com/maven2/org/eclipse/wst/css/core/maven-metadata.xml

              [WARNING] Could not transfer metadata org.eclipse.wst.css:core/maven-metadata.xml from/to repository.jboss.com (http://repository.jboss.com/maven2/): Error transferring file: Connection timed out

              [WARNING] Could not transfer metadata org.eclipse.wst.css:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory

              Downloading: http://repository.jboss.com/maven2/org/eclipse/wst/sse/core/maven-metadata.xml

              Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/sse/core/maven-metadata.xml

              [WARNING] Could not transfer metadata org.eclipse.wst.sse:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory

              Downloading: http://repository.jboss.com/maven2/org/eclipse/wst/common/uriresolver/maven-metadata.xml

              Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/common/uriresolver/maven-metadata.xml

              [WARNING] Could not transfer metadata org.eclipse.wst.common:uriresolver/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory

              Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/sse/core/maven-metadata.xml

              [WARNING] Could not transfer metadata org.eclipse.wst.sse:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory

              [INFO] ------------------------------------------------------------------------

              [INFO] Reactor Build Order:

              [INFO]

              [INFO] Arquillian Container JBoss AS Managed 6.x

              [INFO] Arquillian Container JBoss AS Embedded 6.x

              [INFO] Arquillian Container JBoss Reloaded Embedded 1.x

              [INFO] Arquillian Container GlassFish Embedded 3.1

              [INFO] Arquillian Container Jetty Embedded 6.1.x

              [INFO] Arquillian Container Jetty Embedded 7.x and 8.x

              [INFO] Arquillian Container Tomcat Embedded 6.x

              [INFO] Arquillian Container Weld SE Embedded 1.x

              [INFO] Arquillian Container Weld SE Embedded 1.1.x

              [INFO] Arquillian Container Weld EE Embedded 1.1.x

              [INFO] Arquillian Container OpenEJB Embedded 3.1.x

              [INFO] Arquillian Container OpenWebBeans Embedded 1.x

              [INFO] Arquillian Container Aggregator

              [INFO] Arquillian Extension Performance

              [INFO] Arquillian Extension Selenium

              [INFO] Arquillian Extension Aggregator

              [INFO] Arguillian Framework Aggregator

              [INFO] Arquillian Example Domain

              [INFO] Arquillian Example JUnit

              [INFO] Arquillian Example TestNG

              [INFO] Arquillian Example Aggregator

              [INFO] Arquillian Reference Guide

              [INFO]                                                                        

              [INFO] ------------------------------------------------------------------------

              [INFO] Building Arquillian Container JBoss AS Managed 6.x 1.0.0-SNAPSHOT

              [INFO] ------------------------------------------------------------------------

              Downloading: http://repo1.maven.org/maven2/org/jvnet/staxex/stax-ex/maven-metadata.xml

              Downloaded: http://repo1.maven.org/maven2/org/jvnet/staxex/stax-ex/maven-metadata.xml (351 B at 0.4 KB/sec)

              Downloading: http://download.java.net/maven/2/com/sun/istack/istack-commons-runtime/1.1-SNAPSHOT/maven-metadata.xml

              Downloaded: http://download.java.net/maven/2/com/sun/istack/istack-commons-runtime/1.1-SNAPSHOT/maven-metadata.xml (323 B at 0.3 KB/sec)

              Downloading: http://download.java.net/maven/2/com/sun/istack/istack-commons/1.1-SNAPSHOT/maven-metadata.xml

              Downloaded: http://download.java.net/maven/2/com/sun/istack/istack-commons/1.1-SNAPSHOT/maven-metadata.xml (315 B at 1.0 KB/sec)

              Downloading: http://repo1.maven.org/maven2/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom

              Downloading: http://download.java.net/maven/2/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom

              [WARNING] The POM for woodstox:wstx-asl:jar:3.2.1 is missing, no dependency information available

              Downloading: http://repo1.maven.org/maven2/ws-commons/policy/1.0/policy-1.0.pom

              [WARNING] The POM for ws-commons:policy:jar:1.0 is missing, no dependency information available

              [INFO]

              [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ arquillian-jbossas-managed-6 ---

              [INFO] Deleting /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target

              [INFO]

              [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-java-version) @ arquillian-jbossas-managed-6 ---

              [INFO]

              [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-version) @ arquillian-jbossas-managed-6 ---

              [INFO]

              [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment) @ arquillian-jbossas-managed-6 ---

              [INFO]

              [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ arquillian-jbossas-managed-6 ---

              [INFO] Using 'UTF-8' encoding to copy filtered resources.

              [INFO] Copying 3 resources

              [INFO]

              [INFO] --- maven-compiler-plugin:2.3.1:compile (default-compile) @ arquillian-jbossas-managed-6 ---

              [INFO] Compiling 6 source files to /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target/classes

              [INFO]

              [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ arquillian-jbossas-managed-6 ---

              [INFO] Using 'UTF-8' encoding to copy filtered resources.

              [INFO] Copying 1 resource

              [INFO]

              [INFO] --- maven-compiler-plugin:2.3.1:testCompile (default-testCompile) @ arquillian-jbossas-managed-6 ---

              [INFO] Compiling 2 source files to /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target/test-classes

              [INFO]

              [INFO] --- maven-dependency-plugin:2.1:unpack (unpack) @ arquillian-jbossas-managed-6 ---

              [INFO] Configured Artifact: org.jboss.jbossas:jboss-as-distribution:6.0.0.Final:zip

              [INFO] Unpacking /home/corallo/.m2/repository/org/jboss/jbossas/jboss-as-distribution/6.0.0.Final/jboss-as-distribution-6.0.0.Final.zip to

                /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target

                 with includes null and excludes:null

              [INFO]

              [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ arquillian-jbossas-managed-6 ---

              [INFO] Surefire report directory: /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target/surefire-reports

               

               

              -------------------------------------------------------

              T E S T S

              -------------------------------------------------------

              Running org.jboss.arquillian.container.jbossas.managed_6.JBossASIntegrationTestCase

              Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.358 sec <<< FAILURE!

               

               

              Results :

               

               

              Tests in error:

                initializationError(org.jboss.arquillian.container.jbossas.managed_6.JBossASIntegrationTestCase)

               

               

              Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

               

               

              [INFO] ------------------------------------------------------------------------

              [INFO] Reactor Summary:

              [INFO]

              [INFO] Arquillian Container JBoss AS Managed 6.x ......... FAILURE [2:51.334s]

              [INFO] Arquillian Container JBoss AS Embedded 6.x ........ SKIPPED

              [INFO] Arquillian Container JBoss Reloaded Embedded 1.x .. SKIPPED

              [INFO] Arquillian Container GlassFish Embedded 3.1 ....... SKIPPED

              [INFO] Arquillian Container Jetty Embedded 6.1.x ......... SKIPPED

              [INFO] Arquillian Container Jetty Embedded 7.x and 8.x ... SKIPPED

              [INFO] Arquillian Container Tomcat Embedded 6.x .......... SKIPPED

              [INFO] Arquillian Container Weld SE Embedded 1.x ......... SKIPPED

              [INFO] Arquillian Container Weld SE Embedded 1.1.x ....... SKIPPED

              [INFO] Arquillian Container Weld EE Embedded 1.1.x ....... SKIPPED

              [INFO] Arquillian Container OpenEJB Embedded 3.1.x ....... SKIPPED

              [INFO] Arquillian Container OpenWebBeans Embedded 1.x .... SKIPPED

              [INFO] Arquillian Container Aggregator ................... SKIPPED

              [INFO] Arquillian Extension Performance .................. SKIPPED

              [INFO] Arquillian Extension Selenium ..................... SKIPPED

              [INFO] Arquillian Extension Aggregator ................... SKIPPED

              [INFO] Arguillian Framework Aggregator ................... SKIPPED

              [INFO] Arquillian Example Domain ......................... SKIPPED

              [INFO] Arquillian Example JUnit .......................... SKIPPED

              [INFO] Arquillian Example TestNG ......................... SKIPPED

              [INFO] Arquillian Example Aggregator ..................... SKIPPED

              [INFO] Arquillian Reference Guide ........................ SKIPPED

              [INFO] ------------------------------------------------------------------------

              [INFO] BUILD FAILURE

              [INFO] ------------------------------------------------------------------------

              [INFO] Total time: 3:35.849s

              [INFO] Finished at: Wed Mar 16 09:09:48 CET 2011

              [INFO] Final Memory: 31M/84M

              [INFO] ------------------------------------------------------------------------

              [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project arquillian-jbossas-managed-6: There are test failures.

              [ERROR]

              [ERROR] Please refer to /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target/surefire-reports for the individual test results.

              [ERROR] -> [Help 1]

              org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project arquillian-jbossas-managed-6: There are test failures.

               

               

              Please refer to /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target/surefire-reports for the individual test results.

                        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)

                        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

                        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

                        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

                        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

                        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

                        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

                        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)

                        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

                        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

                        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

                        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

                        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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

                        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

                        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

                        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

              Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

               

               

              Please refer to /home/corallo/Desktop/arquillian/containers/jbossas-managed-6/target/surefire-reports for the individual test results.

                        at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:629)

                        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

                        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

                        ... 19 more

              [ERROR]

              [ERROR] Re-run Maven using the -X switch to enable full debug logging.

              [ERROR]

              [ERROR] For more information about the errors and possible solutions, please read the following articles:

              [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

               

               

              this is mvn info:

               

              mvn -version

              Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)

              Maven home: /opt/local/apache-maven-3.0.3

              Java version: 1.6.0_10, vendor: Sun Microsystems Inc.

              Java home: /opt/local/SorgentiProgrammi/jdk1.6.0_10/jre

              Default locale: it_IT, platform encoding: UTF-8

              OS name: "linux", version: "2.6.32.26-175.fc12.i686.pae", arch: "i386", family: "unix

               

              Any suggestion?

              • 4. Re: Arquillian + JSFUnit + Selenium
                kpiwko

                Hi Stefano,

                 

                I'm sorry, there's a typo,  correct command to skip tests is

                 

                mvn clean install -DskipTests
                

                 

                (http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html)

                • 5. Re: Arquillian + JSFUnit + Selenium
                  stefanorg

                  Hi karel,

                   

                  sorry but i'm new to maven i didn't knew that property.

                   

                  anyway i'm getting this error now at arquillian-selenium compilation:

                   

                   

                  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:testCompile (default-testCompile) on project arquillian-selenium: Compilation failure: Compilation failure:

                  [ERROR] /home/corallo/Desktop/arquillian/extensions/selenium/src/test/java/org/jboss/arquillian/selenium/factory/QualifierTestCase.java:[112,83] inconvertible types

                  [ERROR] found   : org.jboss.arquillian.selenium.spi.Configurator<com.thoughtworks.selenium.DefaultSelenium,capture#964 of ?>

                  [ERROR] required: org.jboss.arquillian.selenium.factory.QualifierTestCase.MockConfigurator

                  [ERROR]

                  [ERROR] /home/corallo/Desktop/arquillian/extensions/selenium/src/test/java/org/jboss/arquillian/selenium/factory/PrecedenceTestCase.java:[106,83] inconvertible types

                  [ERROR] found   : org.jboss.arquillian.selenium.spi.Configurator<com.thoughtworks.selenium.DefaultSelenium,capture#742 of ?>

                  [ERROR] required: org.jboss.arquillian.selenium.factory.PrecedenceTestCase.MockConfigurator

                  [ERROR] -> [Help 1]

                  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:testCompile (default-testCompile) on project arquillian-selenium: Compilation failure

                            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)

                            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

                            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

                            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

                            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

                            at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

                            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

                            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)

                            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

                            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

                            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

                            at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

                            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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

                            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

                            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

                            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

                  Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure

                            at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)

                            at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161)

                            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

                            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

                            ... 19 more

                  • 6. Re: Arquillian + JSFUnit + Selenium
                    kpiwko

                    Hi Stefano,

                     

                    what version of JDK are you using? I've been seeing same error on JDK 1.6.0_13, compiler is not able to correctly infer class type. Upgrade JDK if you can.

                     

                    One important note though, during last days arquillian/master on github.com was updated to contain 1.0.0.Alpha5. Arquillian 1.0.0.Alpha5 contains Arquillian Drone, which encapsulates support for Selenium.

                     

                    As result, you have no longer to compile Arquillian by yourself, you can simply grab 1.0.0.Alpha5 from Maven repository. Official documentation will be released soon on jboss.org. I don't know, however, if JSFUnit gettingstarted project is compatible with Alpha5.

                    • 7. Re: Arquillian + JSFUnit + Selenium
                      stefanorg

                      Hi Karel,

                       

                      i'm using  jdk 1.6.0_10 ... i'll upgrade and retry the build and i'll try the alpha5 too...

                       

                      what's the release plan of arquillian? when we are going to see a beta version ? Do you think that i can rely on arquillian(alpha4 or 5) framework right now to do my test or i've to wait for a more stable release?

                       

                      thanks

                      • 8. Re: Arquillian + JSFUnit + Selenium
                        alrubinger

                        This depends on how you define stability.

                         

                        The ShrinkWrap and ARQ test suites are fairly comprehensive and we've historically been delivering alphas that have given users a lot of milage.  However, the "Alpha" qualifier denotes that we're not ready to yet lock the API.  So when updating to new versions, some refactoring may be required on the user's end to match renamed methods, annotations, etc.

                         

                        S,

                        ALR

                        • 9. Re: Arquillian + JSFUnit + Selenium
                          kpiwko

                          Meanwhile, I've updated your modified gettingstarted example to Alpha5. Selenium is working, but it broke JSFUnit functionality. Apart from pom.xml, there were modifications required in arquillian.xml, removed jndi.properties(no longer needed) and some Arquillian and ShrinkWrap API changes.