Skip to content


Subversion checkout URL

You can clone with
Download ZIP
This repository contains a collection of tests organized by technology that showcase Arquillian's capabilities.
Pull request Compare This branch is 13 commits ahead of aslakknutsen:master.
Failed to load latest commit information.
cdi-ejb fix missing end tag
cdi Update to work with Gradle 1.7
container-boms upgrade glassfish to 3.1.2
daemon [ARQ-1193] Add a showcase example for the Arquillian Server Daemon
ejb-testng Remove ExecutionType on JBoss AS 7 configuration, no longer needed in…
ejb document how to pass test in openejb 4
extensions added Arquillian Smart URL extension
jaxrs upgrade glassfish resources config
jaxws minor enhancements, fixes and dep upgrades
jms container boms improvements
jpa-lite upgrade to Arquillian 1.0.0.CR1; add as7 container
jpa-persistence-extension Updated APE to 1.0.0.Alpha5
jpa upgrade glassfish resources config
jsf Update to Arquillian Core 1.0.1.Final
multinode add note about config/disable firewall
osgi jboss community formatting (XML files)
parent Refactor and fix Warp Alpha2 tests.
servlet minor enhancements, fixes and dep upgrades
spring Update showcase to Spring Extension Beta 1.
ui minor enhancements, fixes and dep upgrades
warp Refactor and fix Warp Alpha2 tests.
.gitignore ARQ-957 update name and version of Warp JSF extension module update description
pom.xml [ARQ-1193] Add a showcase example for the Arquillian Server Daemon

Arquillian Showcase

This repository contains a collection of tests that showcase Arquillian's capabilities. The test cases are organized into modules according to the technology that is being tested. For example, CDI tests are located in the cdi project, EJB tests in the ejb project and so on. The dependencies used in each of the projects are managed by the parent project.

System Requirements

To run the tests in these project, you need the following:

  1. Java SDK 1.6, to compile the Java code and run Maven. You can choose from the following:

    • OpenJDK
    • Oracle Java SE
    • Oracle JRockit
  2. Maven 3.0.0 or newer, to run the tests from the commandline

    • If you have not yet installed Maven, see the Maven Getting Started Guide for details.
    • If you have installed Maven, you can check the version by typing the following in a command line:

      mvn --version

  3. You can also use Eclipse with the m2e plugin, NetBeans or IntelliJ IDEA to run the tests from the IDE.

Preparing the projects

To prepare the projects, you first need to build the parent and container BOM projects and install them into your local Maven repository.

Begin by opening a terminal and switching to the root directory of the project. Then run the following Maven command:

mvn install -Psetup

Running your first tests

The simplest tests to run are the tests in the cdi project. By default, the tests will run on a Weld (EE) Embedded container. There is no extra configuration necessary.

mvn test -f cdi/pom.xml

You can also run the tests on a managed JBoss AS 7 application server. Maven will handle downloading and extracting the server for you. All you need to do is activate the Maven profile setup for running tests in this environment:

mvn test -f cdi/pom.xml -Parq-jbossas-managed-7

In the two examples above, you can drop the -f argument if you first change to the cdi directory:

cd cdi
mvn test
mvn test -Parq-jbossas-managed-7

There are many other profiles available for running the tests on other CDI-compliant servers and embedded runtimes.

You can run all the tests in the showcase using the Maven test goal from the root directory of the showcase:

mvn test

The tests are run on the default container specified for each project.

Extension projects

The extensions directory contains several examples of Arquillian extensions. Here's a list of extension projects with a short description of each.

  • autodiscover - analyzes test case and generates mocks for fields annotated @Mock; demonstrates a custom enricher
  • declarative - analyzes test case and adds libraries to archive declared in @Library annotation; demonstrates use of an archive processor fed by declarative metadata
  • deploymentscenario - allows you to configure in arquillian.xml the @Deployment method per test class; demonstrates use of a custom deployment scenario generator
  • lifecycle - supports annotated methods for observing before/after deploy/undeploy life cycle events; demonstrates registration of a life cycle observer
  • systemproperties - adds system properties to the test archive that can be referenced from the test; demonstrates use of an archive processor/appender
  • weld-servlet - adds the weld-servlet library to the deployment archive for running tests that use cdi in a servlet environment; demonstrates the use of the archive processor/appender
Something went wrong with that request. Please try again.