Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
valentinb
Advisor
Advisor

BACKGROUND


Multiple features related to automated test integration have been introduced by SAP Solution Manager 7.2 SPS14 release, including the ability to synchronise execution status of SAP Solution Manager test packages, with the results of automated tests triggered by SAP Enterprise Continuous Testing by Tricentis (ECT). This was described my previous blog post.

Now that you are familiar with this new integration, it is then possible to set up a highly scalable architecture by using Distributed EXecution feature (commonly known as DEX), which allows tests to be run across all available computing resources, such as computers on your network or virtual machines on the cloud.

WHAT IS DISTRIBUTED EXECUTION (DEX)?


The purpose of Distributed EXecution (DEX) is to distribute your automated tests to multiple computing resources, called agents.

By default, when you execute your tests, SAP Enterprise Continuous Testing by Tricentis (ECT) takes control of your mouse and keyboard, so it can interact with the System Under Test (SUT). Consequently, users can't work on this machine for the duration of the test run. And if you have large test sets, it simply takes too long to run all of them on one machine.

Distributed Execution will speed up large test runs and leaves user machines unblocked.

In addition, and thanks to the integration, all agent results are returned to SAP Solution Manager.


The different elements that make up this architecture are described in the table below:













User Machines (1-n VM/PC) Tosca Distribution Server Agents (1-n VM/PC)


Create Tests

Define & trigger  execution

Synchronize results with SolMan


Part of Tosca Server

Distribute tests among agents

Monitor execution & agents


Execute the tests

Send results to Tosca Distribution Server

HOW TO SETUP DISTRIBUTED EXECUTION (DEX) ENVIRONMENT?



On Tosca Server


In order to run Distributed Execution, a "DEX Workspace" must be created on Tosca Server. This workspace is a technical workspace, it should not be used as a "working" workspace for users.

The procedure for creating this workspace is the same as for any workspace creation. Simply use the connection string of the common repository.



Next, open the "Tricentis Service Configuration" of your Tosca Server. Then go to "Automation Object Service" tab and populate: "Workspace Folder", "Project Root Name", "Workspace Name", "Username", and "Password" fields with those from your DEX Workspace. Then click on "Save".



On the Agents


To start and connect your Agents, right-click the file ToscaDistributionAgent.exe and select "Run as administrator" from the context menu. By default, this file is located on the folder: "%TRICENTIS_DEX_AGENT_HOME%". After a few seconds, you should see the agent icon on the Windows taskbar.



Agent icon in the Windows taskbar


Right-click the agent icon in the Windows taskbar and select "Configure Agent" from the context menu. This opens Tosca Distribution Agent Configuration window.

In the ToscaDistributionAgent Configuration window, click on "Connect to server" tab and enter the address of the DEX Server:

http://<Tosca Server Gateway IP address or host name>:<Gateway port>/DistributionServerService/CommunicationService.svc


Tosca Distribution Agent Configuration


If the connection to the DEX server is successful, the ToscaDistributionAgent configuration window displays a green check mark next to the server address input field. Finally, click on "Save".

You can also check that your agents appear in the "Agent view" tab of your Tosca Server.


Agent View



On the user machines


Go to Project->Settings->Commander->DistributedExecution->Server. As the value of the setting "EndpointAddress", enter the address of ToscaGateway Service as follows:

http://<Tosca Server Gateway IP address or hostname>:<port>/DistributionServerService/ManagerService.svc

Go to Project->Settings->Commander->DistributedExecution->Monitor Url. As the value of the setting "Url", enter the address of ToscaGateway Service as follows:

http://<Tosca Server Gateway IP address or hostname>:<port>/Monitor/


Tosca Settings



HOW TO USE DISTRIBUTED EXECUTION (DEX) COMBINED WITH SAP SOLUTION MANAGER INTEGRATION?


As described in my previous blog post, the interface with SAP Solution Manager should have automatically generated an Execution List, which contains the tests you specified at the time of the creation your Test Package.

The execution of this Execution List is conditioned on the status of your Test Plan, which must allow it. As a reminder, it is not necessary to launch the execution from SAP to make the interface work, a direct execution from Tricentis is possible.


Execution list created by the interface


A TestEvent organizes the execution with Tosca Distributed Execution.

It contains the following objects:

  • One or more ExecutionLists that have been generated through the interface with SAP Solution Manager.

  • Configurations that specify which Tosca Distribution Agents should execute which ExecutionLists within the TestEvent.


Once you trigger the execution, Tricentis Tosca transfers your TestEvent to the Tosca Distribution Server.

How to create a TestEvent?


In Tosca Commander, go to the Execution tab.Then, checkout the TestEvents object and right-click on the TestEvents and select "Create New TestEvent" from the mini toolbar.


Create a TestEvent


To assign configurations to a TestEvent, drag and drop:

  1. Configurations that you want to use onto the TestEvent.

  2. ExecutionLists onto the respective configurations.


To trigger the execution of a TestEvent, right-click on the TestEvent and select "Execute Now" from the context menu.

The Agents execute the tests, and send the information back to the Tosca Server. And then automatically synchronise the status in SAP Solution Manager, as well as in Tosca at TestEvent level.


It is also possible to follow the progress of the tests and see the results from the "Event View" tab of Tosca Server.


Event viewer



WHAT'S NEXT : DISTRIBUTED EXECUTION, CI/CD & CHARM INTEGRATION


We have now successfully implemented a highly scalable architecture using the Distributed EXecution functionality of SAP Enterprise Continuous Testing by Tricentis (ECT), while taking advantage of automatic synchronisation with SAP Solution Manager.

We will see in the near future how to take advantage of other features, such as the possibility to trigger the execution of a Test Event via a REST API, that is also a feature included in SAP Enterprise Continuous Testing by Tricentis (ECT). Or the possibility to move towards a CI/CD Oriented Approach (with an integration with Jenkins for example).

Furthermore, developments are underway for the next releases of SAP Solution Manager. It will be possible to have an integration with Change Request Management (ChaRM), which would allow the execution of automated tests from any ChaRM Document status change.

Follow my profile to be notified of the next blog post. Please feel free to ask any questions in the comments section below.