HTML and CSS Reference
In-Depth Information
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
...
</project>
Writing Tests Using Arquillian and Drone
We will use Arquillian to simulate the deployment of the web application to a web container. Once the web
application is deployed in the embedded container, we will start running functional tests using the Drone extension
by executing a request against the deployed application and verifying that it responds with the expected output. As an
example we will test a simple application that asks the user for his name followed by greeting the user. A mock-up of
the user interface is shown in Figure 11-3 . Based on the mock-up, we need a Facelets file that shows the UI to the user
and a CDI bean for storing the name as illustrated in Figure 11-4 .
 
Search WWH ::




Custom Search