Measuring time (MercuryTimers)

The MercuryTimers object enables measurement of time between any two operations. Unlike the native VBScript Timer function, the MercuryTimers object supports the utilization of multiple timer_name time measurement transactions in parallel. In essence, the Timers object is a kind of Dictionary that can store different Timer objects, each with a unique key. This can be useful to measure the time elapsed at different levels of the run session, and hence, identify possible bottlenecks caused by specific blocks of code.

The MercuryTimers object provides the following methods to use with a Timer object:

  • Start: This starts measuring time in milliseconds
  • Stop: This stops measuring time
  • Continue: This continues to measure time ...

Get Advanced UFT 12 for Test Engineers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.