How to use a custom server configuration file for Arquillian

In this quick article we will learn how to provide a custom server configuration file to Arquillian Testing framework.

A simple and effective way to use a custom standalone.xml (or its variants) in Arquillian is to pass it via the System Properties contained in javaVmArguments of arquillian.xml.

Here’s an example of it:

<container qualifier="jbossas-managed"  default="true" >


  <property name="jbossHome">${jbossHome}</property>

  <property name="outputToConsole">true</property>

  <property name="allowConnectingToRunningServer">true</property>

  <property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=256m -Djboss.bind.address=${arquillian.localAddress}