Micro Focus QTP (UFT) Forums
Transaction Time - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Transaction Time (/Thread-Transaction-Time)



Transaction Time - Raj20091 - 12-05-2009

Hello,

Code:
Services.StartTransaction "trans1"
Services.EndTransaction "trans1"

1) How can I capture the StartTransaction time to a variable?
2) How to get time it took to run the transaction in a variable?

Thanks,
Raj


RE: Transaction Time - sreekanth chilam - 12-05-2009

Hi,

Code:
Services.StartTransaction "trans1"
    Start=Timer
       --- write Transaction code ----
       ------------------------------
     Finish=Timer
    Services.EndTransaction "trans1"
     Transaction_Time=Finish-Start
    msgbox "Time taken by the Transaction: "&Transaction_Time&" Seconds"



RE: Transaction Time - Raj20091 - 12-05-2009

That should do. Thanks sreekanth .

So, technically I don’t need Services.StartTransaction and Services.EndTransaction ?