Menu

Integrate Tosca with Universal Agent

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

This article will create a Universal Agent to execute a sample Tosca project created with Tosca Commander. 

Prerequisites

  • Tosca must be installed in the same machine with Automation Host version 2.1.0 or later
  • If you are not familiar with Tosca, refer to their manual.

Setting up Tosca Project with Tosca Commander

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

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

first-steps-project.png

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

create-quote-ci.png

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.

build-root-folder.png

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.

workspace-path.png 

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.
    launch-create-agent.png

  3. The New Agent dialog will display.new-agent-dlg.png
  4. Enter the information below for the new agent.

General Agent Information

universal-agent-general-info.png

  • 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 Agent to 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 Agent is now configured.

tosca-universal-agent.png

You have finished creating Universal Agent for 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 TestNG Universal Agent was created.
  2. Locate the agent in the Agents list and select the Run now button.
    tosca-run-now.png
  3. The Universal Agent execution 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.
    tosca-execution-result.png

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

 

 

Subscribe To Our Blog
Powered by Zendesk