Custom properties for executing with multiple repositories
![]() |
This topic describes a legacy feature that Tricentis plans to discontinue in the near future. For detailed information on the deprecation plan and time line, see this Tricentis Knowledge Base article. To find out about alternatives, check out this topic. |
If you set up Tosca Continuous Integration with Tosca Distributed Execution, you can execute tests from multiple common repositories.
The procedure to configure your system to work with multiple repositories depends on the setup option you choose for Tosca Distributed Execution:
-
Configure Distributed Execution with AOS (Automation Object Service) for multiple repositories.
-
Configure Distributed Execution without AOS for multiple repositories.
Configure Distributed Execution with AOS for multiple repositories
To execute tests from multiple repositories with Distributed Execution with AOS, perform the following actions in addition to the normal process:
-
For each repository, create and configure a new workspace for AOS.
-
Create a separate XML file for each repository.
-
For each repository, use a different Tosca CI Client to launch the execution of your tests.
-
Specify a test results file that is different for each repository. You can do this in one of the following ways:
-
In the configuration of the Tosca CI Client for Windows operating systems.
-
In the configuration of the Tosca CI Client for non-Windows operating systems.
-
Using the call parameter -r when you start the Tosca CI Client.
-
Configure Distributed Execution without AOS for multiple repositories
Once you have created an XML file, specify which TestEvents the Tosca Continuous Integration Client (Tosca CI Client) should forward for execution. If you use multiple repositories with one Tosca Distribution Server, you need to specify which Tosca Distribution Agent has access to the repository that stores the TestEvent you want to execute.
Otherwise the system forwards the TestEvent to any available, idle Tosca Distribution Agent. If this agent does not have access to the repository, the TestEvent fails.
To specify which Tosca Distribution Agent(s) should execute a particular TestEvent, follow the steps below:
-
Create a custom configuration for Tosca Distributed Execution as described in chapter "Custom configurations".
-
Define a corresponding custom property within the testConfiguration tags in the XML file as described in the example below.
If you use multiple repositories, you need to create a separate XML file for each repository. Within this XML file, you can filter for one or more TestEvents from the same repository.
Example
This example shows how to prepare the execution of a TestEvent with the UniqueId 12345. This TestEvent lies in a repository that is connected to the following Tosca Distribution Agents:
-
Agent 1 with the host name ABC01
-
Agent 2 with the host name ABC02
-
Agent 3 with the host name ABC03
To specify that only these agents should execute the ExecutionLists within the TestEvent, follow the steps below:
-
Set a server parameter for the repository on the Tosca Distribution Server:
<TestConfigurationParameter>
<Name>RepositoryX</Name>
<Comment></Comment>
<TestConfigurationParameterValues>
<TestConfigurationParameterValue>
<Key>1</Key>
<Value>True</Value>
</TestConfigurationParameterValue>
</TestConfigurationParameterValues>
</TestConfigurationParameter>
-
Stop and restart Agent 1, Agent 2, and Agent 3 (see chapter "Work with Tosca Distribution Agents").
-
Set the RepositoryX parameter in the configuration of all Tosca Distribution Agents that have access to this repository, i.e. Agent 1, Agent 2 and Agent 3.
Set RepositoryX parameter for Agent 1
-
In Tosca Commander, right-click the
Configurations object in the Execution section. Select Update configurations from Server from the context menu.
-
Create a new configuration for RepositoryX.
Create RepositoryX configuration in Tosca Commander
-
In the tree view, right-click the
Configurations object and select Refresh Agents from the context menu to perform the following actions:
-
Update the Tosca Distribution Agent properties in Tosca Commander with the RepositoryX information
-
Display all agents that match the RepositoryX configuration in the RepositoryX configuration
-
Updated Tosca Distribution Agents listed in the RepositoryX configuration
-
Assign the RepositoryX configuration to the TestEvent with the UniqueId 12345. To do so, drag and drop the configuration onto the TestEvent as described in chapter "Create a new TestEvent".
-
Create an XML file and specify which TestEvent the Tosca CI Client should forward for execution:
-
Add the property TestEvent to define the TestEvent to be executed.
-
Add a custom property for the RepositoryX configuration, so the Tosca CI Client knows which Tosca Distribution Agents to trigger.
-
<?xml version="1.0" encoding="utf-16" ?>
<testConfiguration>
<TestEvents>
<TestEvent>12345</TestEvent>
</TestEvents>
<customProperties>
<property name="RepositoryX">True</property>
</customProperties>
</testConfiguration>
Once you launch your tests, the Tosca CI Client will perform the following actions:
-
It triggers the execution of the TestEvent with the UniqueId 12345.
-
It triggers Tosca Distribution Agents that have the property RepositoryX set to True.
These agents will then execute the ExecutionLists within the TestEvent.