Arquillian,xml for different environments


#1

Team,

How can i maintain multiple arquillian,xml files or multiple configurations for Offshore, Dev, Prod and Test.

Supposing i have to use a different proxy for Dev and Test can i have two configurations or 2 arquillian files let us say arquillian-dev.xml and arquillian-Test.xml?

Where does it trigger arquillian.xml file, can i have a different file name like myarquillian.xml

This is maven project in Intellij and i am working on Selenium and Cucumber
in my settings.xml one of the proxy is configured as below

  <proxy>
    <id>mycompany-proxy</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>192.168.144.19</host>
    <port>6128</port>
    <nonProxyHosts>localhost|192.168.*</nonProxyHosts>
</proxy>

can i add another proxy configuration here and refer that id in arquillian,xml file, if i can how do i differentiate between Dev/Test and Prod environments dynamically

Please suggest if you have any other way to do the same


#2

We had similar problem,
We want to use different server adapter (remote, managed, standalone) in some situations.
So i created a template of the arquillian.xmlwith parameters on these part which have to be changable.
With the build-Tool (in my case gradle) we read properties from a file und push them into the template.
So you can generate the arquillian.xml you need for special envirement, based on the properties you read from a file. The generateArquillianXML-Task, which pump the properties into the template an copy the template into /src/test/resources-folder, will run before the test will start.


#3

Thanks @hoeppy, this is interesting but we are not using build tool yet.

This is definitely a useful solution in the future for us