This post was written by Moshe Kraus from TruClient, Performance Engineering Core R&D team
TruClient is an easy-to-use tool for creating scripts that can be used in load testing or in the monitoring of Web applications.
Unlike other automation tools, which require coding skills, TruClient creates a step-model which is executed in an asynchronous manner and can interact with your application and dynamically respond to it. While not having to write code can be a big advantage and can make script creation much simpler, programmers often want to create their own logic. TruClient does include some control flows in the dynamic model, such as “if” and “for” structures—but these don’t provide much scope for adding complex logic or customized functions to the script.
TruClient coded scripts run in an asynchronous way on a dedicated thread, and do not block the browser or TruClient’s asynchronous communication with it.
This is what a simple script looks like, after converting it to code using two different object identification handling methods:
After the initial creation of the coded script, you can change the code as you see fit.
TruClient also supports some debugging capabilities for coded scripts, as shown in the following animated image:
Useful tips when working with TruClient coded scripts:
When unsure how to do something in TruClient code, do it first in the TruClient model and convert it to code. Then just copy and paste it.
Use the autocomplete in the editor to explore the new APIs that TruClient has to offer.