Chapter 4. Configurations

Table of Contents

4.1. Create a Configuration
4.1.1. Defining the actors
4.1.2. Defining the setups
4.2. Activate the Configuration

The actors that are involved in the test scenarios have to be specified in a PETA configuration. Different actor setups can be specified that define the roles of the actors during test case execution. An actor can be defined as external, if an existing (sub-) system shall be tested. Or it can be defined as an internal actor that will be simulated by PETA during test case execution.

4.1. Create a Configuration

While the setups are only needed for the test case execution, the definition of the actors is required during test development, too. Therefore, before the creation of test cases, a PETA configuration has to be created first. This is shown in the following.

To create a new PETA configuration, press the New test configuration button available in the tool bar. In the new wizard, keep the selection on the path peta/configuration, enter config as the name of the configuration, and press the Next button.

Figure 4.1.  New PETA configuration

New PETA configuration


On the next page, annotations can be entered describing the configuration.

Figure 4.2. Describing the new configuration

Describing the new configuration


4.1.1. Defining the actors

Use the Next button to get the third page, which is used to define the actors used in the test project. Press the Add button to get a new wizard to enter the information to define the actor representing the CourseManager server.

Figure 4.3. Actor setup page

Actor setup page


In the emerging dialog, enter Server as the actor's Id and a short Description . Select the This actor provides a service checkbox and enter the external and internal URL. After entering the information, press the OK button to create the new actor.

Figure 4.4. Defining the server actor

Defining the server actor


Press the add button to define the second actor representing the user's client. This actor does not provide a service, therefore, leave the This actor provides a service. checkbox unselected and enter the values of Id and Description , only.

Figure 4.5.  Defining the Client actor

Defining the Client actor


4.1.2. Defining the setups

Press the Next button to get the next page to define the test setups. First, press the Add button to create a new setup with name Simulated .

Figure 4.6.  Creation of setup Simulated

Creation of setup Simulated


This setup will be used to simulate the behavior of the server, therefore, all actors have to be defined as internal. To do this, double click on the Client and the server actor until their states are set to internal.

Figure 4.7.  Define actors as internal.

Define actors as internal.


Next, press the Add button to define a second setup to test the real server. Name this setup Real and again double click on the Client actor to set it's state to internal. As the real server shall be tested with this setup, the Server actor has to be defined as external by double clicking on it until it's state is set to external. Now, the configuration can be created by pressing the Finish button.

Figure 4.8. Defining a second setup

Defining a second setup