java - Testing with Arquillian, how to share Arquillian.xml? -
how can arquillian configuration file arquillian.xml shared between projects , team members?
<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 qualifier="jbossas-managed-wildfly-8" default="true"> <configuration> <property name="jbosshome">c:\test\wildfly-8.1.0.final</property> <property name="javavmarguments">-djboss.socket.binding.port-offset=2 -xmx512m -xx:maxpermsize=128m</property> <property name="managementport">9992</property> </configuration> </container>
the problem points specific locations on the disk, , different team members use wildfly in different locations.
in addition must duplicate arquillian.xml each project uses it.
we use arquillian maven testing (which inject values) , junit tests within eclipse (which cannot inject them).
any ideas how this?
since there maven support , structure can make use of maven properties , replace of place holder values. simple
i guess arquillian.xml under src/test/resources/arquillian.xml right? can replace absolute values properties.
<configuration> <property name="jbosshome">${jboss.home}</property> </configuration>
the above property can either defined in properties section of pom or can overridden during mvn executuon using -djboss.home=c:\mypath
in order though thing work, want maven automatically each developer when package arquillian.xml replace place-holder ${jboss.home} value, have either defined on top in properties section or have passed command line. done through resource filtering functionality
<build> <testresources> <testresource> <directory>src/test/resources</directory> <filtering>true</filtering> </testresource> <testresources> </build>
see simple examples here
Comments
Post a Comment