Now, you can try out the test case. First try to run the simulated setup, to check if the test case itself is ok:
Open a launcher by pressing →
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.
Fill into the Project field "HTTP Recorder project"
Fill into the Configuration field generated/bookingExampleLoginTest
Select the Simulated setup.
The launch configuration should now look as in Figure 12.10, “The "Project" tab of the launch configuration” .
Now switch to the Suite/Case tab.
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 ” .
Press and to start the test case.
As expected, the test case runs successfully:
Now change the setup to the "Real" setup, to check if the test case runs
successful with the real server:
Open a launcher by pressing →
Select the launch configuration "Run bookingExampleLoginTest".
Change the setup selection to Real . The launch configuration should now look as in Figure 12.13, “ The launch configuration for the real setup ” .
Press and to start the test case.
Again, the result is 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.