Script Automation

About

Script Automation jobs are used to plan and run automated test cases. They can trigger any type of automation script: BAT files, Python scripts, Jenkins or Bamboo jobs, as well as various automation tools (TestComplete, ReadyAPI, and so on).

When you execute an automation job for your test case, the job runs the script you specified when creating the job. The script, in its turn, retrieves data from the specified test automation tool, and after the test execution is completed, Zephyr parses the test results (if you checked the Parse results file check box) and updates them in its UI. You can choose not to parse the results if you just want to trigger an automation tool that will automatically push results to Zephyr. If some of the test cases fail, or if they are blocked, you can re-run them.

After the test run is over, you will get a notification once the results become available.

Create a job

To create a Script Automation job:

1. Select Vortex > Script Automation and click the “+“ icon:

2. In the Individual Test Cases Automation form, populate all the highlighted (required) fields and click Add:

The Individual Test Cases Automation form has the following fields:

Field name

Description

Job Name (required)

The name of the suite automation job.

Job Description

The description of your job.

Script triggering (required)

The path to the script that will trigger the automation.

Parameters

Predefined parameters to be used when the job is run. For example, you can specify which test cases to run, to which release and test cycle they belong, and so on. Zephyr will replace the parameter name with the corresponding values. Example:

Script path: myscript/scrpt1.py
Passed parameters: ${rid} ${cid}
The resulting command to be triggered: myscript/scrpt1.py 1 15

For a list of possible values, see the table below.

Automation Framework

If you choose to parse results (by default, the Parse results file check box is selected), you will have to select one of the supported automation tools from this drop-down menu:

  • SoapUI PRO

  • TestComplete

  • Cucumber

  • JUnit

  • Selenium

  • TestNG

  • Tricentis Tosca

  • UFT

  • Eggplant

These are the tools you will get test results from.

Result Path (required)

The path to the file that will store the results.

Zbot (required)

Select the ZBot that will be used during the execution.

 Values specified in the Parameters field

Parameter

Description

${testcaseIds}

The IDs of all the test cases selected for the execution.

${uid}

The ID of the user who has been assigned to execute the test case.

${rid}

The release ID.

${cid}

The ID of the execution cycle.

${cname}

The name of the execution cycle.

${cpid}

The ID of the cycle phase of the execution cycle.

${build}

The build information of the execution cycle.

${env}

The environment information of the execution cycle.

${nid}

The ID of the tree node to which the testcase belongs.

${nname}

The name of the tree node to which the test case belongs.

${testcaseNames}

The names of all the test cases selected for the execution.

${projectName}

The project name.

${projectId}

The ID of the project the test case belongs to.

${releaseName}

The release name.

${cyclePhaseName}

The name of the cycle phase of the execution cycle.

${username}

The name of the user who is executing the test case(s).

Execute a job

After creating a Script Automation job, you can execute it to trigger automation for your test cases. To learn how to do that, see Executing Automated Test Cases.

See Also

Zephyr Test Automation
Zephyr Vortex
Suite Automation
Folder Watcher
ZBot Overview