Skip to end of metadata
Go to start of metadata

During execution of your Arquillian test-suite, you may have configured one or more containers with which you need to execute the test suite. This is usually configured with maven profiles, but in the case where individual container options need to be specified at runtime to the target container. This is where you will need to specify configurations in your arquillian.xml file, and also activate those configurations using Java system properties.

Example arquillian.xml with two container configurations:

 Activating a configuration via the command line

The -Darquillian.launch system property is what controls arquillian.xml configuration selection. If you are running tests from Eclipse or directly from the command like, you should add the -D system property to your launch configuration or command.

Activating a configuration via Maven

These configurations may be activated in the maven profile using the Surefire plugin configuration in your container's maven profile to set the 'arquillian.launch' system property for test execution, as follows:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Sep 11, 2012

    I think it's necessary to add

    in the arquillian.xml. See:

  2. Oct 05, 2015

    I think this would be a good place to add that you can also create an arquillian.launch file which may contain the name of the qualifier to be used by tests as described here. This comes in handy if you used a maven profile to set the value of the arquillian.launch system property in the surefire configuration but want to run a test manually in eclipse. As the surefire config is not taken into account in eclipse, this file allows making this selection manually.