How to configure a scripts executions parameters

Each script can have an accompanying config file (.json) that pre-defines the configuration applied to an execution script. The filename of that config is identical tot he script but has a “.json” extension.

For example:

if my script were called “myScript.feature”, the config file would be called “myScript.json”.

All options can be configured in the file or can be set during the manual execution of a single script (see the screen below).

There are three main reasons for creating script configuration files:

  • Setting the default automation Browser and behaviours for the execution of the script
  • Disabling the ability for the tests executor to change that config.
  • Test plan steps (scripts) cannot be configured during execution, so need to be configured in advance.

Creating a Config File

There are two ways to create a config file. To ensure the latest version, it is advised that you use the “New” function in Pickle.

Manual

Copy the following JSON code into a file you have created manually.

{
  "SeleniumWaitTimoutSeconds": 0,
  "SeleniumCustomDriverName": "",
  "FailQuietly": true,
  "StopOnFail": false,
  "AllowEditConfigInUI": true,
  "SeleniumDriverName": "chrome",
  "BypassIFrameSecurity":true
}

Pickle

Crate the template using the new file wizard:

  1. In Pickle, select the “File” menu.
  2. Select “New..” (CTRL+N)
  3. In the new file dialogue select “Script Driver Configuration” item in the “JSON Data File” section.

  1. Click Create.
  2. A template JSON File will be created.

Configuration Parameters

Selenium Timeout

{
  "SeleniumWaitTimoutSeconds": 0
}

Defines (in seconds) how long selenium will wait before a command fails.

Selenium Driver

{
  "SeleniumDriverName": "",
}

Defines the driver name to use when executing a web automation script. Supported Values:

  • chrome
  • ie
  • edge
  • firefox
  • Custom (See custom selenium driver)

Custom Selenium Driver

{
  "SeleniumCustomDriverName": ""
}

If the driver name is set to “custom” this parameter allows you to define which custom drive to use. :!: Custom Drivers are not currently supported. This is provided for future compatibility.

Fail Quietly

{
  "FailQuietly": true
}

Defines if the automated test fails without providing the standard failure dialogue options (Stop Test or Continue).

Stop On Failure

{
  "StopOnFail": false
}

if the script “fails quietly” this determines if the script stops on failure or continues to try to execute later steps.

Disable User Configuration

{
  "AllowEditConfigInUI": true
}

if set to false, the user will not be able to change the configuration when executing. They could still edit the JSON file.

Bypass Cross-Domain Scripting Protection

{
  "BypassIFrameSecurity":true
}

if true and the driver is Chrome, security controls will be disabled and scripting will work across Iframe form separate origins.

  • wiki/pickle/sautomconfig.txt
  • Last modified: 08/06/2019 07:20
  • by ThinkingEngine