Running Eggplant Functional Scripts
You can run Eggplant Functional scripts using any of the following:
Running Scripts from Eggplant Functional
Click the Run button in any of these windows—the Suite window, from the Viewer window toolbar, or from the Run window if a script has already been executed— to run an Eggplant Functional script. Note that the Run button isn't part of the default toolbar in the Viewer window, but can be added from the Customize Toolbar panel.
Related:
Running Scripts using Eggplant Functional Schedules
The Schedules tab for each schedule you define lets you provide connection details for scripts, set the run order, and control other options for the schedule.
The scripts you add to a schedule can come from any suite, not just the active one. You can even drag from the Scripts list of one Suite window to the Schedule tab of a different Suite window.
You can't add tables to a schedule; only individual scripts are possible, although you can add as many scripts to a schedule as you need to.
Adding Scripts to a Schedule
There are two ways to add scripts to a schedule:
- While on a Schedule tab, click the Add button on the bottom of the Suite window, then browse for the script or scripts you want to add.
- While on a Schedule tab, drag script names from the Scripts list to the schedule in the main window.
Adding Connection Details in a Schedule
When you run a script from the Schedules pane, you can provide connection information to specify a SUT for a script to run.
To specify a SUT for a script, select the script on the schedule tab and enter the information in the Connection area to the right. The Server field includes a drop-down list containing all of the SUTs in your connection list.
If a SUT is specified for the initial script run and no subsequent scripts have specified SUTs, the connection stays active for all of the following script runs.
Changing the Run Order in a Schedule
You can move a script to a different place in the schedule by dragging it. To move a range of scripts, Shift-drag the script names to a new location. To move multiple non-sequential scripts together, Ctrl-click (Cmd-click on Mac) and drag the script names.
Duplicating Scripts in a Schedule (Mac only)
To schedule additional runs of a script in the schedule, Option-drag the script name as if to move it. The original script remains, and a copy is created wherever you drop the script name.
You can add the Option key when you are already dragging a script name.
Setting Script Dependencies
On the Schedules tab, you can schedule a script to run only if the preceding script is successful.
To set up a dependency, select one or more scripts that depend on the success of the previous script, and click the right arrow button or press the right arrow key. The script is indented to show the dependency. (Click the left arrow button or press the left arrow key to remove the dependency.)
You can create many levels of dependency by indenting multiple times.
Although the Schedules pane doesn't support dependencies based on script failures, you can accomplish this effect with a primary control script. For more information, see Running from a Primary Script.
Disabling and Removing Scripts from the Schedule
To temporarily disable a script in the schedule, deselect its checkbox in the Run column. If a disabled script has dependent scripts, those scripts are disabled as well.
To permanently remove a script from the schedule, select the script and click the Remove button.
Running a Schedule Manually
To run the scripts in a schedule, select the schedule in the Schedules list and click the Run button at the bottom right of the Suite window. If you provided connection information for a script, Eggplant Functional opens a connection with the specified SUT before running the script. If you do not provide connection information, the script is run on the currently active SUT. (If there is no connection information and no current connection, the script fails.)
To run the entire batch of scripts in a schedule more than once, enter the appropriate number in the Repeat field before you click the Run button.
If a script fails when it is run from the Schedules pane, the failure is noted in the Status column of the Schedule tab, and Eggplant Functional moves on to the next script; there is no command or error that prevents a schedule from running to completion.
Running a Schedule at a Particular Time
Here are three ways to run a schedule at a designated time:
- Use Eggplant Manager to schedule script runs. To learn more about Eggplant Manager, see the Eggplant Manager product description and Eggplant Manager user's manual.
- Use Windows Scheduled Tasks (Unix
crontab
orat
command for Linux and Mac). - Include the command-line call in a build script or some other shell script that is already running automatically. This process is often done to verify that a new build of an application does not have any defects before it is delivered to QA or other parts of the organization.
Running a Schedule from the Command Line
Schedules can also be run from the command line. See Running from the Command Line for more information.