12.3. Run the test case

Now, you can try out the test case. First try to run the simulated setup, to check if the test case itself is ok:

  1. Open a launcher by pressing RunRun…

  2. Create a new PETA Test launch configuration called "Run bookingExampleLoginTest", by clicking the New Launch Configuration ( ) button and entering Run bookingExampleLoginTest into the Name field.

  3. Fill into the Project field "HTTP Recorder project"

  4. Fill into the Configuration field generated/bookingExampleLoginTest

  5. Select the Simulated setup.

The launch configuration should now look as in Figure 12.10, “The "Project" tab of the launch configuration” .

Figure 12.10. The "Project" tab of the launch configuration

The "Project" tab of the launch configuration


Now switch to the Suite/Case tab.

  1. Select Case: and enter generated/bookingExampleLoginTest into the Case: field. The project tab should be now configured as in Figure 12.11, “ The "Suite/Case" tab of the launch configuration ” .

  2. Press Apply and Run to start the test case.

Figure 12.11.  The "Suite/Case" tab of the launch configuration

The "Suite/Case" tab of the launch configuration


As expected, the test case runs successfully:

Figure 12.12.  The test case with the simulated setup ran successful

The test case with the simulated setup ran successful


Now change the setup to the "Real" setup, to check if the test case runs successful with the real server:

  1. Open a launcher by pressing RunRun…

  2. Select the launch configuration "Run bookingExampleLoginTest".

  3. Change the setup selection to Real . The launch configuration should now look as in Figure 12.13, “ The launch configuration for the real setup ” .

    Figure 12.13.  The launch configuration for the real setup

    The launch configuration for the real setup


  4. Press Apply and Run to start the test case.

Again, the result is successful:

Figure 12.14.  The test case with the Simulated setup was successful.

The test case with the Simulated setup was successful.


Both setups ran successful. So at the first glance, it seems to be that it does it's work, that is, testing if the login procedure works correctly.

On a closer inspection, it can be realized that the only assertions made in the Check-events are, that the status code returned by the server didn't change. The server could return completely other pages than recorded but the test case will succeed.