Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This repository contains a collection of tests organized by technology that showcase Arquillian's capabilities.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Octocat-spinner-32 cdi-ejb fix missing end tag May 21, 2012
Octocat-spinner-32 cdi Update to work with Gradle 1.7 September 12, 2013
Octocat-spinner-32 container-boms upgrade glassfish to 3.1.2 May 21, 2012
Octocat-spinner-32 daemon [ARQ-1193] Add a showcase example for the Arquillian Server Daemon November 13, 2012
Octocat-spinner-32 ejb-testng Remove ExecutionType on JBoss AS 7 configuration, no longer needed in… August 31, 2011
Octocat-spinner-32 ejb document how to pass test in openejb 4 May 21, 2012
Octocat-spinner-32 extensions Fix Source examples in README to use MarkDown syntax and not GitHub e… May 28, 2012
Octocat-spinner-32 jaxrs upgrade glassfish resources config May 21, 2012
Octocat-spinner-32 jaxws minor enhancements, fixes and dep upgrades May 20, 2012
Octocat-spinner-32 jms container boms improvements July 18, 2011
Octocat-spinner-32 jpa-lite upgrade to Arquillian 1.0.0.CR1; add as7 container July 16, 2011
Octocat-spinner-32 jpa-persistence-extension Updated APE to 1.0.0.Alpha5 September 01, 2012
Octocat-spinner-32 jpa upgrade glassfish resources config May 21, 2012
Octocat-spinner-32 jsf Update to Arquillian Core 1.0.1.Final June 04, 2012
Octocat-spinner-32 multinode add note about config/disable firewall May 23, 2012
Octocat-spinner-32 osgi jboss community formatting (XML files) April 24, 2011
Octocat-spinner-32 parent Refactor and fix Warp Alpha2 tests. January 16, 2013
Octocat-spinner-32 servlet minor enhancements, fixes and dep upgrades May 20, 2012
Octocat-spinner-32 spring Update showcase to Spring Extension Beta 1. August 30, 2012
Octocat-spinner-32 ui minor enhancements, fixes and dep upgrades May 20, 2012
Octocat-spinner-32 warp Refactor and fix Warp Alpha2 tests. January 16, 2013
Octocat-spinner-32 .gitignore ARQ-957 update name and version of Warp JSF extension module May 24, 2012
Octocat-spinner-32 README.md update description May 21, 2012
Octocat-spinner-32 pom.xml [ARQ-1193] Add a showcase example for the Arquillian Server Daemon November 13, 2012
README.md

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.