-
1. Re: How to run Arquillian in jenkins
kwintesencja Jun 2, 2014 10:23 AM (in response to smkreddy)Hi,
its basically the same as running locally althought you may concern with 1, where is the container and 2 where functional tests will run:
for 1 i usually use a managed container which is downloaded to target folder via maven during build, here is a wildfly example:
<profile>
<id>wildfly-managed</id>
<properties>
<arquillian.serverHome>${project.build.directory}/wildfly-8.1.0.Final</arquillian.serverHome>
</properties>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>8.1.0.Final</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-classes</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
<version>8.1.0.Final</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<systemPropertyVariables>
<arquillian.launch>wildfly-managed</arquillian.launch>
</systemPropertyVariables>
<environmentVariables>
<JBOSS_HOME>${arquillian.serverHome}</JBOSS_HOME>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
basically the tests you run on top of a fresh wildfly located at target folder.
Another option is to have the server instalation in the same machine where jenkins runs and point JBOSS_HOME to it.
for 2 if your CI doesnt have graphic support you may use a remote selenium grid and point arquillian tests to it via arquillian.xml:
<extension qualifier="webdriver">
<property name="browser">${arquillian.browser}</property>
<!-- <property name="dimensions">1280x1024</property> -->
<property name="remote">true</property>
<property name="remoteAddress">ip-to-selenium-grid:1044/wd/hub</property>
</extension>
or if you don't want to manage selenium grid can try a headless browser like phantomjs:
<extension qualifier="webdriver">
<property name="browser">phantomjs</property>
</extension>
i hope it helps