Skip to content

How do I capture and print cumulative load timing for set of instructions in Transaction Detail Report

This example demonstrates capturing and printing the cumulative load timing for a set of instructions in the Transaction Detail Report.

In the solution shown below, a dataset is created using "ddCreateDataSet" command and a row is added to the dataset using "ddAddRows". The timer block is started using the "timerForTestInstructionsBlockStart" command. The HICC application is launched using the "open" command and the logo is validated using "waitForVisible" command. The cumulative time to launch the application and validate the logo is captured and appended to the dataset using "ddAppendInstructionBlockTimingToDataSet" command. The timer block is ended using the "timerForTestInstructionsBlockEnd" command. The response time is fetched from the dataset using "ddGetCellValueByName" and printed in the Transaction Detail Report using the "echoForReporting" command.

Solution:

# Command Target Value
Creating the dataset and specifying the data definition name of the data file
1 ddCreateDataSet
Cumulative_Load_Timing
Cumulative Load Timing(W)
Adding rows to the data file
2 ddAddRows
Cumulative_Load_Timing
1
Starting the timer block by providing the User Defined Variable "LogLevel" that holds the value "ALL" and the time unit "S" that represents seconds
3 timerForTestInstructionsBlockStart
#{LogLevel}S
Launching the application
4 open
https://ww.eureqatest.com
/training/insurancecal/prod.html

Validating the visibility of application logo
5 waitForVisible
id=eureqalogo

Appending the cumulative time into the attribute/column "ResponseTime" in the dataset "Cumulative_Load_Timing"
6 ddAppendInstructionBlockTimingToDataSet
Cumulative_Load_Timing
ResponseTime
Ending the timer block
7 timerForTestInstructionsBlockEnd

Fetching the Cumulative Time from the dataset and store it into a variable
8 ddGetCellValueByName
Cumulative_Load_Timing(0,ResponseTime)
time
Printing the response time into the column "CumulativeLoadTime" in Transaction Detail Report
9 echoForReporting
CumulativeLoadTiming ${time}

Tips, Tricks, Gotchas & Best Practices:  

  • In the above solution the value provided for the variable "LogLevel" in the User Defined Variable screen is "ALL" which includes all types of log values, you can also capture the timing only for a specific log value. The other values that are supported by "LogLevel" are "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "OFF". To know more about it click here.
  • It is mandatory to have an "Attribute" with the name "ResponseTime" in the data definition that defines the dataset where the cumulative load time will be appended.
  • You can also capture the time in MS(represents Milli Seconds), M(represents Minutes) or H(represents Hours) by providing the required time unit in the "Value" field in "timerForTestInstructionsBlockStart" command.
  • The column name provided in the "echoForReporting" command needs to be configured within the Worksoft SaaS domain, to know more about it click here.


    Feedback and Knowledge Base