Forum Discussion

IRISQATeam's avatar
IRISQATeam
Contributor
7 years ago
Solved

How to find time difference from action to another?

Hi,
I need to measure the time difference from one action to another. For example, whenever I click the Login button, it loads the login page. I need to find the time difference, how long it took to load the login page after clicking Login button?

 

Thank you. 

  • When doing a Keyword test, there is a Performance group of actions that allows you to start a timer and then get the value of that timer at a particular point.  This is one way to do what you want.

     

    For script code, there's the HISUtils.StopWatch object that you can utilize to start a timer and then log/check elapsed time.

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    When doing a Keyword test, there is a Performance group of actions that allows you to start a timer and then get the value of that timer at a particular point.  This is one way to do what you want.

     

    For script code, there's the HISUtils.StopWatch object that you can utilize to start a timer and then log/check elapsed time.

  • cunderw's avatar
    cunderw
    Community Hero

    Test Complete 12.5 also has a time difference column in the logs by default now. 

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      cunderw wrote:

      Test Complete 12.5 also has a time difference column in the logs by default now. 


      Yeah, that's a pretty awesome new feature.  I like it much. :) There is a minor caveat... you need to actually log something to see that.  So, if you're just logging in and then doing a page.Wait without anything being written to the log once the page is loaded, the elapsed time column isn't going to help.  This doesn't negate the awesomeness of the new feature, just means that, if you need to make those measurements, you need to write out measurement "bookmarks" to the log to see the elapsed time.

      • cunderw's avatar
        cunderw
        Community Hero

        Ahhhh, I didn't even catch that. I probably log too much so didn't even notice lol.