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.
- 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.
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.
- Open config file at C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\ToscaCI\Client\ToscaCIClient.exe.config in a text editor.
- 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
- From Launch, open the host machine where you want to create the new agent.
- Select the + New Agent button.
- The New Agent dialog will display.
- 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
Leave this field empty.
- Select batch as the executor.
- Enter path to ToscaCI Client folder: C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\ToscaCI\Client\
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
Optional field. Select Tosca JUnit as the Result Parser.
- 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.
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
- Access the host machine where the TestNG Universal Agent was created.
- Locate the agent in the Agents list and select the Run now button.
- The Universal Agent execution dialog will display.
- 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.