With Arquillian Seam 2 extension you can easily test your applications created with Seam 2 framework against real containers!
Following features are supported:
- Test enrichment for @In injection points from the Seam 2 Context.
- Packaging support for adding the Seam 2 framework (so you don't need to specify it explictly in your @Deployment method).
|You can turn off autopackaging feature in arquillian.xml. See "Additional configuration" section for details.|
Let's consider following Seam 2 component
In order to test it we can write standard Arquillian-powered test:
Under the hood Arquillian Seam 2 extension will enrich the test archive with all required dependencies needed for deploying Seam 2 application and deploy it to the container as web archive (WAR).
You can customize Arquillian Seam 2 extension configuration in arquillian.xml by adding following element:
List of all available properties
|Property name||Default value||Description|
|seamVersion||2.2.2.Final||Version of Seam 2 framework artifact used by autopackaging mechanism|
|jbossElVersion||1.0_02.CR5||Version of JBoss Expression Language extension artifact used by Seam 2|
|autoPackage||true||Turn on/off autopackaging feature.|
The only extra dependency needed is arquillian-seam2, as described in the snippet below.
Take a look at the Getting started to see how you set up arquillian using maven.
Note: You might face problems obtaining some Seam 2 dependencies. You should add these repositories to fix the problem.