Chapter 12. HTTP Recorder

Table of Contents

12.1. Preparations
12.2. Create the HTTP Recording
12.3. Run the test case

Building the test cases by hand can be very tedious. Especially when building test cases for testing web sites, large amounts of data must be generated to simulate the communication between two actors. The PETA designer has a built in HTTP Recorder, that allows to capture the traffic between a browser and the web servers. This recording can be transformed automatically into PETA test cases. So for example a test case can be built from a use case just by going through the use case with the browser as a user would do it. The generator builds all documents that are essential for the test case. These files are:

The following chapter shows how a test case can be built from a recording that was captured from the communication between the browser and the web servers. This recording is made only by using a normal web browser.

The test cases that are built from the recording assert a minimum of functionality, i.e. the status of the returned pages. They can be enhanced with more assertions afterwards. How this is done is shown in Chapter 13, Handling of dynamic data.

12.1. Preparations

In the following example a login procedure for a JBoss Seam demo application will be recorded and a test case will be generated. To be sure that the login and the password exist, go to the web site http://seam.demo.jboss.com/home.seam, follow the link "Register a new user" and create a new user with a password. Make sure that the user name and the password are at least five characters long.

For this part of the tutorial create a new project and call it HTTP Recorder project. Refer Section 3.1, “Create a Project” to see a full description of how a project is created.

For the recording a TPTP Agent Controller must be installed and running. Please refer to the "getting_started.html" webpage in your TPTP Agent Controller installation directory for further information on configuring and launching the installed TPTP Agent Controller.