Forum Discussion

smattey's avatar
smattey
New Contributor
11 years ago

How to get the elapsed time?

Hi,



After script execution, i want to get the total elapsed time(i.e Wait time, Sync time and Timers) of script. How to get the total elapsed time, It will greatly help for your suggestions.



Regards,

Santosh Kumar.M

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Santosh,



    > [...] i want to get the total elapsed time(i.e Wait time, Sync time and Timers) of script [...]

    Not sure what you meant with "Wait time, Sync time and Timers", but if you like to get the total test execution time  you may either

    -- Switch to the Summary panel of the Log;

    or

    -- On the Project Log panel select the top element of the Log Items tree;

    -- In the Project Log pane (the one on the right from the Log Items) right-click and select Show Summary in the context menu;

    -- On the opened Summary right-click below the Run Time column and select Sum in the context menu.



    Does this help?
  • gid_216's avatar
    gid_216
    Frequent Contributor
    Hi Santosh,



    Using StopWatch you can get the elapsed time.



    try below code:

    Set objWatch =HISUtils.StopWatch

    objWatch.Start 'Use before first statement



    objwatch.Split 'Use after last statement



    Split will give you the elapsed time in milisecods