Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enterprise Synthetics > Testpartner recorder > Best practices


Hello Forum

My customer have developed an application accessible from his subsidiaries only via google version 55 64 bits running via terminal services for application.

My job is to setup a ES landscape in order to measure the response time and performance of the traffic issued from subsidiaries and to report bottlenecks and incidents.

My ES agents are testparner. Unfortunately I am not a VB addict but I succeed anyway to rise scripts that are working quite fine. Anyway, I have some open questions:

1) Since the latest chrome versions are not supported by ESM, I wrote all the scripts using bitmap recognition. I would like to know if this is the best method, and if there is some way to to identify the objects, since I am suffering at every build release to update my scripts. In my case, OCR recognition is not a solution (we are working Right to Left in Hebrew)


- with chrome, the instruction window().Attach uses the string

Application=CHROME.EXE Caption="<my app name>"

And click is done by

GUIObject(ClassName=Chrome_RenderWidgetHWND caption='Chrome Legacy Window').Click x,y

- with chrome under terminal services, the instruction window().Attach uses the string

Application=MSTSC.EXE Caption="<my app name>"

and click is done by

Window.Click x,y

2) something is not clear to me, I understood that Check assets are allowing to create a break point for ES management, but how about testing the returned value in order to take some action in my script ? Is it possible ? The solution I found is to double all my check assets with an event assets pointing on the same bitmap, but it's heavy to maintain.

Is there a better way ?

3) my testpartner agent is loosing agility after several runs, particularly with Chrome under TS: generally it fails to recognize screen visible objects and even skip transactions sometime. I checked with my customer, he doesn't agree to reboot the agent after each run.

Can one explain me why the performance are downgrading, and if there's a way to setup some post cleaning batch to avoid rebooting ( killing services, release memory...)?

Thanks for your help.




Dynatrace Pro
Dynatrace Pro

Hi Daniel,

The recommended way to go about bitmap recognition is to create ImageMap objects containing the bitmaps, and then use the WaitForImage Framework function inside your scripts to test for the presence of a single bitmap. Using the WaitForAnyImages function, you can also test for the presence of one bitmap out of a set of them, and do different things based on which bitmap was recognised.

The documentation page for the two functions is Wait Functions.

An example of how to use the WaitForAnyImages function is as follows:

Dim iRet as IntegeriRet = WaitForAnyImages("ImageMap1", "ImageMap2", "ImageMap3")
If iRet = 1 Then
' Do actions if ImageMap1 was found on screen

Else If iRet = 2 Then
' Do actions if ImageMap2 was found on screen

' Do actions if ImageMap3 was found on screen

End If

In general, using the Scripting Framework is recommended (rather than Checks, Events) as it integrates well with Enterprise Synthetic, and there are a large number of functions available that can greatly simplify the process of writing scripts. I also find it to be quite reliable in practice - agents should only need to be rebooted daily, and certainly not after every script. The Framework also provides support for cleanup functions to be triggered after each script run to restore the robot to the same state, including closing browsers and programs after both successful and failed runs.

The Framework comes with a series of example scripts, named ZZ_*****, which show how you can achieve common tasks using the Framework's functions.



Hi Luke

Thank you for your answer. It is helpful.