HTML and CSS Reference
In-Depth Information
What Is Arquillian?
Arquillian is a complete platform for in-container testing of Java EE applications. Arquillian integrates with testing
frameworks such as JUnit and TestNG making it easy to adopt for anyone comfortable writing unit tests. Arquillian
uses an embedded application server of your choice to deploy the classes and resources subject to testing. Once the
JSF application has been deployed in the embedded application server, you can test the behavior of the system by
calling the classes and resources and inspecting their response. Out-of-the-box Arquillian is capable of testing JEE
components such as EJBs and CDI beans. Several extensions have been built for Arquillian to support functional
testing. Table 11-6 outlines popular extensions to Arquillian.
Table 11-6. Popular Extensions for Arquillian
Extension
Purpose
Maturity
Drone
Wrapper for the WebDriver API also used by Selenium. This extension makes it
possible create simple functional tests.
Link: http://arquillian.org/modules/drone-extension/
Stable
Warp
Simulating interactions on the client-side while examining the change of state
on the server side at the different phases of the JSF request lifecycle.
Link: http://arquillian.org/modules/warp-extension/
Alpha
Graphene
Enhances the Drone extension by gracefully supporting Ajax through guarding
and interception of requests.
Link: http://arquillian.org/modules/graphene-extension/
Stable
Persistence
Verify the persistence layer of the application. Allows for seeding the database
using common data formats such as XML, XLS, YAML, JSON, and SQL.
Link: http://arquillian.org/modules/persistence-extension/
Alpha
Performance
Verify that tests execute within a given time range. Will catch performance
issues during regression testing.
Link: http://arquillian.org/modules/performance-extension/
Beta
Seam 2
Allows testing of Seam libraries and injection points.
Link: http://arquillian.org/modules/seam2-extension/
Beta
In this section we will explore how to use Arquillian and the Drone extension to do blackbox testing of JSF
applications. First we will look at how to set up Arquillian and Drone for a Maven project followed by looking at how to
write sensible JUnit tests using the Drone extension.
The Arquillian Warp Extension is the official replacement for the JSFUnit project, which is no longer being
maintained. At the time of writing, the Warp extension is still in Alpha state and no production examples are available.
Note
Setting Up Arquillian and Drone
In this section we will look at how to set up Arquillian and Drone in a Maven project. If you do not use Maven
you can find guides on including the necessary dependencies in your project on the Arquillian website
( http://www.arquillian.org ) .
 
 
Search WWH ::




Custom Search