Run scripts

This topic explains how to run a codeless automation script locally and how to associate it with tests and units.

Overview

While designing a script, you can run it locally, to make sure that it functions as you expect.

You can use the same script to test multiple applications or environments.

When you run the script, select the applications for it to test: 

  • You can select to run on applications defined in the Script applications. For details on Script applications, see (Optional) Configure script applications.

    When you run the script, the applications you select are launched and the script runs on each selected application.

  • You can select to run on an application that is already open. In this case, the script runs only on that one application. Make sure the application is in the state expected by the beginning of the script.

After the script is ready, associate it with a codeless test or a unit. You can then include the script in a scheduled run or an MBT test.

MBT tests and their units' applications

If you associate your script with a unit and run it as part of an MBT test, the whole MBT test runs only on the first application defined for the script associated with the first unit in the test.

For units that are not the first in the MBT test, you do not have to define script applications. Before running the unit's script locally in Design, open the application you want to test in a browser. Bring the application to the state required for the beginning of the script and then run the script and select to run it on the open application.

Run from step

By default, when you run your script, it runs from the first step. When debugging your script, you might sometimes want to skip the beginning of the script and investigate the behavior of its later steps. For example, your script may have successfully logged in to your web application, but failed to perform the correct tasks in the app. You can skip the log in stage, and only run the part that failed.

Use the Run from step option in a single step's right-click menu to run from that step until the end of the script. In the run view, the steps before the one where you started the run are marked as skipped.

Note that you cannot start a run from a step inside a condition block, multiple steps, or a step marked to exclude from the run.

Prerequisites

Review the following requirements:

  • Make sure your browser is set up to work with FT Design. See Set up the browser extension.

  • Add applications to the Script applications pane, or open the application you want to test and bring it to the state required for the beginning of the script.

Run a script

Perform the following steps to run a codeless automation script.

  1. Open a codeless automation script.

    Submodule How to open a script
    Design

    On the Design Home page, click the name of a script to open it.

    Quality

    On the Details tab of a codeless test, click Open in Design.

    Model-Based Testing

    On the Details tab of an MBT unit whose Testing tool type is FT Design, click Edit in Design.

  2. Click the Run button to run the test from beginning to end.

    To omit a step temporarily from your test run, right-click the step or block, and select Exclude from the test run.

    To re-include a step, right-click it, and select Include in test run.

    Similarly, you can exclude or re-include a condition block in the test run by selecting the If or Else step and using the exclude options available.

    Alternatively, right-click a step and select Run from step to skip some steps at the beginning of the test and run from the selected step to the end of the test.

    Note: If there are any errors in your script, you cannot run any of its steps until you fix the error or mark the erroneous step to be excluded from the run.

  3. In the dialog box that opens, select the applications on which you want to run the script.

    (Optional) Select the option to Keep the application open after the run.

    Note: If this option is cleared, then when the application is closed, any tabs that the script switched to during the run are also closed.

    • If you select to run on the script's applications, the applications you select are launched and the script runs on each selected application.

    • If you select to run on an open application, the script runs only on that one application.

  4. Click Start running. The run session starts. A progress bar is displayed on each application card in the Script applications pane.

  5. Click Stop to end the run session, or Pause to stop it temporarily.

    Note: When running a script containing input and output parameters locally, only default values of input parameters are used. Output parameters are not exported outside of the script.

    To pass non-default values to the script's parameters, you must run its associated codeless test or unit, with data sets defined in the codeless test or MBT test.

    When a run session is paused you cannot make any changes in Design.

Analyze run results

After the run session ends, the Editor displays the run result of each step (including conditional steps if there are any) for the selected applications.

Hover over a failed step to show the reason for the failure.

the run results of a script, including a tooltip explaining the reason the step failed.

Next to each step, you can see the applications on which the script ran, and which steps passed or failed.

Click View last report to see a visual HTML report of the steps that ran and their status. This report is similar in format to OpenText Functional Testing reports, and saved to %localappdata%\VEFTDesign\CodelessAgent\Reports\Codeless folder.

  • If parameters are used in your script, the report contains detailed parameter information, including parameter names and values.

  • If the script included Verify steps, the report shows the expected and actual values encountered by the step,

Click Back To Editor to go to the Editor.

See also