Java Reference
In-Depth Information
An activity is the client part that makes the requests. Inspection is a server-side assertion.
It's also possible to filter some requests by additional specification of the Observer:
Warp
.initiate(Activity)
.observer(Observer)
.inspect(Inspection);
An Observer can, for example, filter HTTP addresses.
Let's take a look at something more concrete. Arquillian Warp also has some extensions.
Currently, all of them are HTTP oriented; however, it is possible to extend Warp to cover
non-HTTP use cases. The extensions add some special classes for testing:
• JSF
• JAX-RS
• Spring MVC
Now we're going to look at the JAX-RS part. To do this, we will use the code from
Chapter 7 , Adding Web Services to Your Applications . We want to test our REST service.
First of all, we need to add all the standard Arquillian-related dependencies and the ar-
quillian.xml file. For the Warp itself, we will need the following dependency:
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-warp</artifactId>
<version>1.0.0.Alpha7</version>
<type>pom</type>
<scope>test</scope>
</dependency>
For the JAX-RS extension, we will need the following dependency:
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-rest-warp-impl-jaxrs-2.0</artifactId>
<version>1.0.0.Alpha2</version>
<scope>test</scope>
</dependency>
Search WWH ::




Custom Search