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 test 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 AUTOM Premium 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…
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.
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
Preparation
Automated test scripts use the value of an environment variable (eg 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
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.
Preparation
A hook is set up on the action actions/checkout
to make a git checkout
of the branch whose name is defined by an environment variable (for example GIT_BRANCH
).
Launching the tests
The value of the environment variable is chosen when launching the tests in Squash TM.
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
Preparation
Automated test scripts use the value of an environment variable (eg 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
Preparation
Tag each execution environment with the SUT it targets.
Launching the tests
Use tags to choose SUT when running tests in Squash TM.