Skip to content

Automation with Ranorex

This feature is available only in the Premium version of Squash AUTOM.

Configuration of the test environment

In the execution environment, an environment variable called SQUASH_MSBUILD_PATH containing the path to the parent folder of MSBuild.exe must be created. You can execute the following command to get the path to your MSBuild executable:

reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath

Test reference in Squash TM

In order to bind a Squash TM test case to a Ranorex automated test, the content of the Automated test reference field of the Automation block of a test case must have the following format:

[1] / [2] # [3] # [4] # [5]

With:

  • [1]: Name of the project on the source code repository.

  • [2]: The path to the solution's .sln file from the root of the project source repository.

  • [3]: Ranorex project name to execute.

  • [4]: Ranorex test suite name to execute.

  • [5]: Ranorex test case name to execute. This parameter is optional.

Nature of the exploitable Squash TM parameters

Here is a table showing the exploitable parameters:

Nature Key
Name of the dataset DSNAME
Dataset parameter DS_[name]
Test case reference TC_REF
Test case custom field TC_CUF_[code]
Iteration custom field IT_CUF_[code]
Campaign custom field CPG_CUF_[code]
Test suite custom field TS_CUF_[code]

Legend:

  • [code]: Value of the "Code" of a custom field
  • [name]: Parameter name as filled in Squash TM

Squash TM parameters usage

When executing a Squash TM automated test case with Ranorex, it is possible to exploit the Squash TM parameters inside the test.

In order to achieve this, you'll have to follow these steps:

  • Create custom fields in Squash TM and bind them to the project bearing the test plan to execute.

  • Make sure that the code fields of the parameters correspond to the names of the existing parameters present in the Ranorex solution.

Info

Squash TM adds a prefix to the code of the transmitted custom field. Make sure to take it into account. Please refer to the Squash TM documentation for more information.

Below is an example of a Ranorex solution and the corresponding Squash TM test case automation:

ranorex-params-1

ranorex-params-2

ranorex-params-1

ranorex-params-2

Supported versions

Squash AUTOM and Squash DEVOPS have been validated with Ranorex 9.5. Any recent version should work properly.

Back to top