You are here

Getting TestComplete to wait for a specific process lowering CPU usage

Sometimes while running tests, the CPU usage for a process (ie. tested application) can get higher than wanted. If the test get unstable due to this. The little trick can help you wait for more CPU power.

function TestProcessCPUUsage()
{
while(Sys.Process("chrome").CPUUsage > 5){
Delay(2000, "Chrome CPU usage: " + Sys.Process("chrome").CPUUsage);
}
}