Integrate Tricentis Tosca with Universal Agent

In this article, you will learn how to integrate Tricentis Tosca. version 11.2, with Universal Agent

This article will create a Universal Agentto execute a sample Tricentis Tosca project created with Tosca Commander. 

Prerequisites

  1. Activate Automation Integrations

  2. Install and Register the Automation Host

  3. Tricentis Tosca must be installed in the same machine with Automation Host version 2.1.0 or later

  4. You must create the following properties in Tosca Commander prior to being able to use this feature:

    • ContinuousIntegration property in your ExecutionList

    • ContinuousIntegrationBuildRootFolder property for your execution results  If you are not familiar with TricentisTosca, refer to this manual to create the properties above.

Setting up Tricentis Tosca Project with Tosca Commander

In this article you will configure Universal Agentto execute a sample Tricentis Tosca project, named First Steps.

The screenshot below shows how this project looks like in Tosca Commander.

Please note that the property ContinuousIntegration of the Create Quote test case must be set to true, as shown below.

You will also need to create a folder for the 'Build result.' That folder must also have a property, named ContinuousIntegrationBuildRootFolder, being set to true.

Configure ToscaCI Client Tool

The next step is to configure ToscaCI Client tool for it to execute our First Steps project.

  1. Open config file at C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\ToscaCI\Client\ToscaCIClient.exe.config in a text editor.

  2. Look for the WorkspacePath user settings and change its value to the path of our First Steps project. Example: C:\Tosca_Projects\Tosca_Workspaces\First Steps\First Steps.tws

  • Note: make sure you update the WorkspacePath to the actual path of your Tosca project. Conventionally, your Tosca project is located at: path\to\your\workspace\<project name>\<project name>.tws

The screenshot below shows how the ToscaCIClient.exe.config file will appear.

Create Tosca Universal Agent

  1. From Launch. open the host machine where you want to create the new agent.

  2. Select the + New Agent button.

  3. The New Agent dialog will display.

  4. Enter the information below for the new agent.

General Agent Information

  • Agent Name: name of the agent, e.g. Tosca Universal Agent

  • qTest Manager Project: select a qTest Manager project from which the agent is going to execute scheduled tests, e.g. qConnect Sample Project

  • Agent Type: Universal Agent

Pre-Execute Script

Leave this field empty.

Execute Command

Executor

  • Select batch as the executor.

Working Directory

  • Enter path to ToscaCI Client folder: C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\ToscaCI\Client\

Execute Command

Enter the command below in the Execute Command editor.

ToscaCIClient.exe -m local -t junit -r "C:\Tosca_Projects\Tosca_Workspaces\First Steps\Test Results\result.xml"

Path to Results

Optional field. Enter this value to specify path to the test result generated by Tosca: C:\Tosca_Projects\Tosca_Workspaces\First Steps\Test Results\result.xml

Result Parser

Optional field. Select Tosca JUnit as the Result Parser.

IMPORTANT NOTE

  • If you want the Universal Agentto submit test results to qTest Manager, you must  specify values for both Path to Results and Result Parser. Otherwise, you must do that yourself via Execute Command.

The screenshot below shows how the new Tosca Universal Agentis now configured.

You have finished creating Universal Agentfor your Tosca project. The agent will be available the next time the host machine polls to qTest Launch.

Execute Tosca Universal Agent

  1. Access the host machine where the Tosca Universal Agentwas created.

  2. Locate the agent in the Agents list and select the Run now button.

  3. The Universal Agentexecution dialog will display.

  4. Select the Execute button to kick off the agent execution and you will see the logs shown in the Console Log section. If the execution is successful, you'll see the test run logs being submitted to qTest Manager.

From now on you can access qTest Manager and schedule Test Execution for the newly created test runs with Tosca Universal Agent