Part 3: Measure Transactions in TruClient – Native Mobile protocol

by in Application Delivery Management

configuration_1536x768.jpgIn the previous posts of this series, I covered the process of preparing your script for performance testing and explained how you can run the same script on multiple devices. In this post, I will talk about how to configure transactions in TCNM. 

In performance testing, transactions are used to measure the response time of an action or a series of actions. A meaningful response time should include the time the App spends responding to the action and displaying the UI where you can do your next action.

In TruClient, for each step, you can set an End Event, which defines the point at which the step ends and subsequent steps are allowed to start running. In TruClient – Native Mobile, there are 2 typical end events you can set.

  • Action Completed: Step ends when the action is completed. When this event happens, it means the action itself is completed. It does not care about how long it takes the App to respond to the action. For example, for a Click step, once the mouse button is up, this end event happens.
  • Object Exists: Step ends when the step action succeeds, and the end event object is visible on the screen. The object is usually the next step’s test object.

In order to get the meaningful response time, you need to set the End Event to Object Exists, otherwise, the transaction time would be very short, almost as 0s.

In the example below, suppose you want to measure the response time of a search action. It defines a transaction which includes one Tap step, which taps on the Search button to start the search action.

blog 3 image 1.png

If you set the End Event of this step to Action Completed, the transaction time would be very short.

If you run this script (the whole script includes several other steps) and check the log, the transaction time is 0.162s (0.9480 - 0.7860), which is very short.

Notify: Transaction "Search" started.

t=00039577ms: Step 3: Tap on imageViewSearch View started    [MsgId: MMSG-205180]

t=00041021ms: Step 3: Tap on imageViewSearch View successfully completed with End Event "Action completed"    [MsgId: MMSG-205180]

Notify: Transaction "Search" ended with a "Pass" status (Duration: 0.9480 Wasted Time: 0.7860).

The correct way is to set the End Event to Object Exists and specify the correct object.

blog 3 image 2.png

Run the script and check the log, and you can see now the transaction time is 0.881s (1.7700 – 0.8890), which makes more sense.

Notify: Transaction "Search" started.

t=00039351ms: Step 3: Tap on imageViewSearch View started    [MsgId: MMSG-205180]

t=00040819ms: Step 3: Tap on imageViewSearch View successfully completed with End Event "Object Exists"    [MsgId: MMSG-205180]

Notify: Transaction "Search" ended with a "Pass" status (Duration: 1.7700 Wasted Time: 0.8890).

Another thing you need to pay attention is that in order to get the correct transaction time, you need to use the packaged version of the application. This is explained in UFTM help.

This post explained how to configure transactions in TruClient – Native Mobile. 

Tags:

Labels:

Project & Requirements Mgmt
Release Management
Application Lifecycle Management
Application Performance Management
Application Security Testing
Functional Testing
Performance Testing
Anonymous