Running a Test Script
Before you can run a test script with Eggplant Studio, you need to have an open test suite and then an open a script file in Eggplant Studio.
Running a simple script
You run a script in Eggplant Studio by clicking the Play button (the right-pointing arrow) in the top right corner of the script pane.
Some scripts require an active connection to a System Under Test (SUT) before they can execute, while others do not. The sample screen below shows a simple script that was run by clicking the Play button.
The Debug Console
In the above script example, the two Log
statements on lines 5 and 6 will
print their output into the Debug Console. When you run a script, you
should be prompted to open the Debug Console. But if not, or you close it
and then need to view it again, it is only a click away.
To access the Debug Console, you need to open a new terminal by clicking
the top-level VS Code menu and choosing Terminal > New Terminal
as shown
in the sample screen below.
Running a Script from the Context Menu
The other way to run a script is to right-click the line of code you wish to
run and select Run script
or Run current line
from the context menu as
shown in the sample screen below. This is a useful feature for verifying
your script is performing the desired task correctly. Or for running one line
of code at a time as you author a new test script.