Arquillian Drone + Selenium keeps old deployments registered.
filip.majernik Mar 3, 2014 12:41 PMHi,
I am trying to use arquillian drone and selenium for automated tests of my jsf (primefaces) frontend. I have three following issues:
1.) When running the test I get following INFO message although the property is set in my arquillian.xml:
INFO: Property "browser" was not specified, using default value of htmlUnit
2.) I always get following exception when running the test:
org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy: research-area-test.war
....
Caused by: java.lang.Exception: "JBAS014803: Duplicate resource [(\"deployment\" => \"research-area-test.war\")]"
3.) The main problem - it seems like the older deployments are somewhere still registered in JBOSS and removed after the tests run. That causes (I assume) following exception as some beans are already deployed:
Caused by: java.lang.Exception: "JBAS014803: Duplicate resource [(\"deployment\" => \"research-area-test.war\")]"
Here is my arquillian.xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<container default="true" qualifier="JBOSS_AS_MANAGED_7.X">
<configuration>
<property name="jbossHome">/usr/share/wildfly-8.0.0.Final/</property>
<extension qualifier="webdriver">
<property name="browser">chrome</property>
</extension>
</configuration>
</container>
</arquillian>
Here is my pom (the relevant parts):
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<properties>
<version.arquillian_core>1.1.2.Final-wildfly-1</version.arquillian_core>
<version.org.jboss.arquillian.drone>1.2.1.Final</version.org.jboss.arquillian.drone>
<version.org.jboss.arquillian.selenium>2.37.1</version.org.jboss.arquillian.selenium>
<version.shrinkwrap.resolvers>2.0.0</version.shrinkwrap.resolvers>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${version.arquillian_core}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-bom</artifactId>
<version>${version.org.jboss.arquillian.drone}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-bom</artifactId>
<version>${version.shrinkwrap.resolvers}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<version>${version.arquillian_core}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-webdriver-depchain</artifactId>
<version>${version.org.jboss.arquillian.drone}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-impl</artifactId>
<version>1.2.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-selenium</artifactId>
<version>1.2.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.37.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>frontend</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<excludes>
<exclude>**/*$*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>arq-jboss_as_managed_7.x</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<configuration>
<systemPropertyVariables>
<arquillian.launch>JBOSS_AS_MANAGED_7.X</arquillian.launch>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>8.0.0.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<version>1.1.2.Final-wildfly-1</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>