Forum Discussion

erlband's avatar
erlband
New Contributor
3 years ago

Using Performance Counters in a Web Application

Greetings!

 

I understand TestComplete uses performance counters from Windows Performance Monitor to measure the memory usage and processor utilisation of an application. In order to add such a counter, the relevant process must already be running and available in the Add Counter wizard under Current Project Properties. 

 

Of course, when I run a web application in my automated test the process ID will be different every time the process is launched. This means I'll have to re-enter the performance counters every time the app is restarted, which is obviously very impractical. Is there any way to measure the performance of the specific process launched by TestComplete using the corresponding ID?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    From what I have read, it's not possible. However, you could automate Performance Monitor to add the counters you need before running your main automation?

     

    • erlband's avatar
      erlband
      New Contributor

      I ended up making a script that checks the MemUsage, CPUUsage and ThreadCount properties of the browser and then saves it in a log file at regular intervals.