Question

I've tried to learn the JBoss Arquillian, by following the formal document and got confused about the configuration, the arquillian.xml. Since it is mentioned once here.

Even I also found that there is a specific configuration describes at the container adapters section. It does not cover all elements/properties, e.g. engine and its property list, defaultProtocol, extension and group.

I'm worried and wondered, if there is any further or full explanation for this configuration file or not. Could you please help to shed some light on this configuration?

Was it helpful?

Solution

There's no single page in the Arquillian Reference Guide that contains your answer. This is partly because of the modular and extensible nature of Arquillian - extension can have their own configuration elements and properties.

To start with, the properties for containers are in the Container Adapters Section. Every adapter has it's own page where the container configuration is detailed. For instance, JBoss AS 7 has it's own page for it's container configuration (see the Configuration section on the page), and so do other containers.

Usually, you wouldn't need to configure the protocol yourself, for the values are usually managed by Arquillian, and usually do not require any overrides to be provided via arquillian.xml. But if you need them, they're in the Protocols section and in the child pages.

A group is merely a collection of containers, to used in cases where the container does not support clustering by default. You merely need to list multiple container configurations in a group element, as shown here.

Extension configuration is typically found in the Extensions child-pages.

The defaultProtocol element does not have any page of it's own. It is used to override the protocol specified by a container adapter, for all tests. There are only a few cases where you would need to use this element, most notably when you need to use the Servlet protocol instead of the JMX protocol for JBoss AS 7 (because the Servlet protocol of Arquillian is a more widely used and tested protocol than the JMX one).

A typical use of defaultProtocol would look like:

<defaultProtocol type="Servlet 3.0" />

where the type is the name of the protocol - "Servlet 2.5" and "Servlet 3.0" are valid values. You may also need to add the protocol dependency to your classpath when you change the default protocol of the container.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top