Java Reference
In-Depth Information
<dependency>
<groupId>com.actionbazaar</groupId>
<artifactId>chapter15-ejb</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
This covers the configuration changes you need to make for Maven. Basically all you
needed to do was add the dependencies to pom.xml. Now that the dependencies are added,
you need to configure the rest of the technologies used during the integration test: Arquil-
lian, Derby, and GlassFish. We'll start with Arquillian and then move on to configuring
GlassFish and Derby.
Arquillian
Arquillian needs some configuration. Arquillian is a feature-rich integration testing tool,
and going through its entire configuration is out of scope for this topic. Instead we'll look
at the simple configuration Arquillian needs for integration testing the chapter15-ejb
EJBs. Arquillian's configuration file is src/test/resources/arquillian.xml. Because you want
to run the integration tests with GlassFish, you need to tell Arquillian where to find the
GlassFish resource configuration for the integration test. This is a simple property in ar-
quillian.xml pointing to the glassfishresources.xml file:
<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="glassfish-embedded" default="true">
<configuration>
<property name="resourcesXml">
src/test/glassfish/glassfish-resources.xml
</property>
</configuration>
</container>
</arquillian>
Search WWH ::




Custom Search