JBoss Community Archive (Read Only)

Arquillian Old

Container varieties

You can run the same test case against various containers with Arquillian. The test class does not reference the container directly, which means you don't get locked into a proprietary test environment. It also means you can select the optimal container for development or easily test the compatibility of your application.

Arquillian recognizes three container interaction styles:

  1. a remote container resides in a separate JVM from the test runner; Arquillian binds to the container to deploy and undeploy the test archive and invokes tests via a remote protocol (typically HTTP)

  2. an embedded container resides in the same JVM as the test runner; lifecycle managed by Arquillian; tests are executed via a local protocol for containers without a web component (e.g., Embedded EJB) and via a remote protocol for containers that have a web component (e.g., Embedded Java EE)

  3. a managed container is the same as a remote container, but in addition, its lifecycle (startup/shutdown) is managed by Arquillian and is run as a separate process Containers can be further classified by their capabilities. There are three common catagories:

  4. A fully compliant Java EE application server (e.g., GlassFish, JBoss AS, Embedded GlassFish)

  5. A Servlet container (e.g., Jetty, Tomcat)

  6. A standalone bean container (e.g., Weld SE, Spring) Arquillian provides SPIs that handle each of the tasks involved in controlling the runtime environment, executing the tests and aggregating the results. So in theory, you can support just about any environment that can be controlled with the set of hooks you are given.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:18:55 UTC, last content change 2011-04-16 11:52:20 UTC.