Running a live testing session

Let’s take two cases of running a live testing session.

Launching from a test case

You can launch live testing session from a .robot test file from the annotation right above a particular test case. This will initialize the live testing session in context of that specific test case. In the example below, live testing is initiate by clicking on Run Live Testing from within salesforceTests.robot file and from above the test case Entering A Lead.

runninglivetesting1

A confirmation dialog box appears to double-check your intent. In this example, the dialog box informs that live testing will be initiated for the test case Entering A Lead and the mentioned settings will prepare the live testing robot. This implies that the live testing robot will be able to understand any custom keyword or variable defined in keywords.robot file.

runninglivetesting2

The live testing is launched with the test case exported in the editor pane. Now, the various controls can be used to execute through the test case.

runninglivetesting3

For the sake of completeness, let’s execute the first step, Appstate. This can be achieved by making the cursor active next to the test step and either pressing Ctrl+Enter (Command+Enter for Mac) or click on the second control from the top, Single Step. As a result, the test step will start blinking, a mark will appear in the front of the test step, logs will be generated, the test step will be added to the history of executed test steps and live stream will be updated.

runninglivetesting4

From hereon, the entire test case can be executed or a step at a time or new steps can be created and executed.

Launching live testing without a test case

Live testing can be launched without a test case as well. However, launching of session from a valid .robot file is a must for its success. A valid .robot file should have valid Settings. In this case, the session can be triggered by either clicking on the right-most Live Testing tab on PaceEditor or clicking on the correct control.

runninglivetesting5

As earlier, a confirmation dialog box will appear. Please note the similarities and the differences between the two. Both the confirmation dialog boxes have the same context setting as marked with the large square box, however the latter does not have a specific test case mentioned to it.

runninglivetesting6

A live testing session will be launched with an empty editor pane. Now, test steps can be entered and executed using the various controls. For the sake of completeness, let’s execute a few new test steps here.

runninglivetesting7

The live testing robot understands the keywords, which are defined under keywords.robot file. In the pic below, I have executed three steps wherein Appstate is a custom PaceWord defined in keywords.robot whereas ClickText and VerifyText are standard PaceWords. The live stream has updated with every step, steps are available in the editor, logged in the history and run time output is shown in the console.

runninglivetesting8

This brings us to saving a session.

Live stream window shows the current state of your application. Additionally, you have access to screenshots of all the states of your application, which are caused by the executed test steps. Hover on the executed test steps in the right most pane with the executed test step history and the live stream screen will update accordingly. Please note that the actual state of your application does not change with the hovering. The actual state can only be changed by executing a test step.

  1. A live testing session is only active as long as you are on the live testing tab. The moment you change the tab the session closes and you will need to re-launch it.

  2. Live testing session times out after 30 mins on inactivity. After which, you will need to re-launch it.