Skip to content

FAQ: Test management from Squash TM

How to pilot the tests from Squash TM?

There are three ways to pilot the tests from Squash TM:

  • the selection of tags on execution environments (available since Squash TM 4.0)
  • use of Squash TM parameters in a test
  • the use of environment variables (available since Squash TM 4.1)

What parameters can be passed from Squash TM to a test?

The following parameters, defined in Squash TM, can be retrieved in a test:

  • Name of the dataset
  • Dataset parameter
  • Test case reference
  • Test case custom field

In addition, if you have a Squash Ultimate license, the following parameters are also available:

  • Iteration custom field
  • Campaign Custom Field
  • Test suite custom field

How to retrieve Squash TM parameters in a test?

The pages describing the support for each technology detail how to do it depending on each technology: Java Param Library, squash-tf-services, commands provided by the test framework…

How are formatted CUF values transmitted to the test?

Type of CUF Format of the CUF value
Plain text the text itself
Checkbox true if the checkbox is checked
false if the checkbox is unchecked
Dropdown list the name of the selected list option
Rich text the text as HTML, e.g. <p>this is <strong>bold </strong>and that is <span style="font-family:Courier New,Courier,monospace"><u>underlined Courier</u></span></p>
Date the date formatted as ISO 8601 (YYYY-MM-DD)
Tag the list of the tags separated by a | character, e.g. one|three|four
Numeric the textual representation of the value, e.g. -42 for an integer, 123.456 for a float

When to use a tag or an environment variable instead?

Here are some typical examples of using tags and/or environment variables.
(The execution environment tags in italics are required by the orchestrator: OS and test technology(ies).)

Example 1: Choosing the operating system

Need

You want to use execution environments with multiple OSes, for example to test that a web application works correctly with Chrome on Windows, Chrome on MacOS, and Chrome on Linux.

Token

Preparation

Create one execution environment per OS. The orchestrator requires an OS tag for each environment.

Launching the tests

Use the tags to choose the OS when launching the tests in Squash TM. But do not use the test technology tags (cucumber, robotframework, etc.) to select an environment, they are only used by the orchestrator to launch a test on an environment with its technology.

Example 2: Choice of browser

Need

You want to use multiple browsers to test that a web application works correctly with Chromium, Firefox, and WebKit.

Two options:

Option 1: An execution environment with different browsers

Token

Preparation

Automated test scripts use the value of an environment variable (e.g. BROWSER) to launch and drive the desired browser.

Launching the tests

The value of the environment variable is chosen when launching the tests in Squash TM.

Option 2: One browser per execution environment

Token

Preparation

Tag each execution environment with the browser installed in it.

Launching the tests

Use tags to choose the browser when launching tests in Squash TM.

Example 3: Choosing the version of automated tests

Need

You want to select the Git branch of the automated tests you want to run.

Token

Preparation

A hook is set up on the action actions/checkout@v2 to make a git checkout of the branch whose name is defined by an environment variable (for example GIT_BRANCH). This hook can be declared in the /app/conf/actionprovider.yaml file or in another file pointed to by the ACTIONPROVIDER_PROVIDER_HOOKS environment variable (see details in related FAQ).

hooks:
- name: checkout Git branch (Windows)
  if: (runner.os == 'windows') && (variables.GIT_BRANCH != '')
  events:
  - category: checkout
  after:
  - run: "@for /F %%A in (\"%INPUT_REPOSITORY%\") do (@cd %%~nA & git checkout %GIT_BRANCH%)"
- name: checkout Git branch (Linux)
  if: (runner.os == 'linux') && (variables.GIT_BRANCH != '')
  events:
  - category: checkout
  after:
  - run: cd `echo $INPUT_REPOSITORY | sed 'sX.*/XX' | sed 'sX\.git$XX'` && git checkout $GIT_BRANCH
(This hook uses the fact that the repository input of the actions/checkout@v2 action can be retrieved via the INPUT_<INPUT_NAME> mechanism.)

Launching the tests

The value of the environment variable is chosen when launching the tests in Squash TM (if left empty, no git checkout is performed, the default branch is used).

Example 4: Choosing the SUT

Need

You want to be able to choose to test the acceptance SUT or the preprod SUT.

Two options:

Option 1: An execution environment accessing the different SUTs

Token

Preparation

Automated test scripts use the value of an environment variable (e.g. SUT) to target the desired SUT.

Launching the tests

The value of the environment variable is chosen when launching the tests in Squash TM.
(Similarly, SUT-dependent data, such as login and password, can also be communicated by environment variables and used by the automated test scripts.)

Option 2: One browser per execution environment

Token

Preparation

Tag each execution environment with the SUT it targets.

Launching the tests

Use tags to choose SUT when running tests in Squash TM.