Skip to content

Squash TM test execution plan retrieval with a PEAC

Squash DEVOPS gives you the possibility to retrieve an execution plan for automated tests defined in Squash TM with an EPAC. The EPAC can be triggered by a Jenkins pipeline (see the corresponding page of this guide).

Focus

To a proper functioning of this functionality, Test Plan Retriever plugin and Result Publisher plugin are required on targeted Squash TM.

Prerequisites

In order to retrieve an execution plan from Squash TM with an EPAC, you need to perform the following tasks in Squash TM :

  • Create a user belonging to the Test automation server group.

  • Create an execution plan (iteration or test suite) containing at least one ITPI linked to an automated test case, as described in the Squash AUTOM user guide (see here).

Integration of the Squash TM execution plan retrieval step into an EPAC

In order to retrieve an execution plan from Squash TM with an EPAC, you need to call the corresponding generator action.

Here is a simple example of an EPAC in Json format allowing the retrieval of a Squash TM execution plan :

{
    "apiVersion": "opentestfactory.org/v1alpha1",
    "kind": "Workflow",
    "metadata": {
        "name": "Simple Workflow"
    },
    "defaults": {
        "runs-on":"ssh"
    },
    "jobs": {
        "explicitJob": {
            "runs-on":"ssh",
            "generator":"tm.squashtest.org/tm.generator@v1",
            "with": {
                "testPlanUuid":"1e2ae123-6b67-44b2-b229-274ea17ad489",
                "testPlanType":"Iteration",
                "squashTMUrl":"https://mySquashTMInstance.org/squash",
                "squashTMAutomatedServerLogin":"tfserver",
                "squashTMAutomatedServerPassword":"tfserver",
                "technologyLabels":{
                    "ranorex": ["windows","ranorex"],
                    "robotframework": ["linux","robotframework"],
                    "junit": ["linux","junit"]
                }
            }
        }
    }
}

A Squash TM generator step must contain the following parameters :

  • testPlanType : Defines the type of test plan to retrieve in Squash TM. Only the values Iteration and TestSuite are accepted.

  • testPlanUuid : This is the UUID of the requested test plan. It can be found in the Description panel by clicking on the Information tab of the iteration or test suite in Squash TM.

  • squashTMUrl : URL of the targeted Squash TM.

  • squashTMAutomatedServerLogin : Name of the Test automation server group user to log into Squash TM.

  • squashTMAutomatedServerPassword : Password of the Test automation server group user to log into Squash TM.

[Optional fields] :

  • tagLabel : Specific to the Premium version - It refers to the name of the tag type custom field on which the test cases to retrieve are to be filtered. It is not possible to specify more than one.

  • tagValue : Specific to the Premium version - It refers to the value of the tag type custom field on which the test cases to retrieve are to be filtered. It is possible to specify multiple ones separated by "value2). There has to be at least one value specified for the test case to be taken into account.

!!! warning "Focus If one of the two tagLabel or tagValue fields is present, the other one must also be specified.

  • technologyLabels : To use for example if you retrieve an execution plan containing tests which must be execute on different environments.
    It enables you to specify, for each automation framework, targeted environment execution's tags.
    They will be add to the ones specify in the job's runs-on attribute.
    For a technology, tags are defined by adding an entry to the field list with format "technology prefix": ["tag1", "tag2"]

Info

By default, jobs created by the Generator after retrieving an execution plan are tagged with the corresponding technology prefix (technology name in lower case with no space, for example "robotframework" for Robot Framework) in addition of the ones specified in Generator job's runs-on attribute.

Squash TM parameters to exploit in an automated test

By executing an EPAC retrieving a Squash TM execution plan, Squash TM passes various pieces of information on ITPIs that can be exploited in a Cucumber, Cypress or Robot Framework test case.

For more information, please refer to the Squash TM parameters exploitation section of the Squash AUTOM documentation, as well as the dedicated section on the desired automation framework.

Results publication in Squash TM at the end of the execution

The nature of the results published in Squash TM at the end of the execution will depend on the usage of a Squash AUTOM Community or Squash AUTOM Premium licence.

Please refer to the Squash AUTOM user guide for more information.

Back to top