Forum Discussion
Hi,
The order should be:
1. aqPerformance.Start()
2. click button to lauch application
3. wait until application is visible
4. aqPerformance.Check(100)
- Colin_McCrae9 years agoCommunity Hero
Should be fine for what you need.
The documentation says it goes down to milliseconds.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqperformance/value.html
Although, you have to factor in the time it takes to find you visible object. How much time that will add is hard to say. It depends what you're searching, how you search for it, and possibly how busy the applications object model is.
If it starts any processes or services, it may be slightly quicker to check for those instead? Not sure. You'd need to have a play about with it and see for yourself.
- Colin_McCrae9 years agoCommunity Hero
I'll also add (as I do performance testing as well), that unless you are only running this application on specific, controlled, hardware, then such a measurement cannot be accepted as a global given anyway.
Because:
Run it on a high spec i7/SSD based PC ..... launch is super fast.
vs
Run it on an Atom based machine, clogged up with other rubbish installed, and running off a 5400rpm HDD, and the result will be much slower.
Of course, if you control the hardware, then fine.
- tristaanogre9 years agoEsteemed Contributor
Just a nitpick:
Application Launch vs Application visible are NOT necessarily the same thing. As Colin_McCrae, there are a number of hardware and environmental factors that could make a determination of when the application actually becomes visible on screen.
Personally, while the features are there, I don't view TestComplete as a tool for that level of performance measurement. It's helpful in keeping track of stuff that has specific requirements, but there's always a variability of error.
- leeasdf99 years agoFrequent Contributor
Hi Colin,
"Although, you have to factor in the time it takes to find you visible object. How much time that will add is hard to say. It depends what you're searching, how you search for it, and possibly how busy the applications object model is."
Thanks for your inputs above, this is actually the point, I don't talk about environments and hardwares, It's only about the accuracy of testcomplete performance check.
Maybe tested application launch is a bad sample, let's say, I want to get performance value of a tab switch of tested application, if I do it manually it's happens immediately. If I perform test below, the performance check(100 minisec.) will never pass, because testcomplete object spy also need time to search for the tab object, this search time is involved in performance value, which exceeds 100 minisec. and make check fail.
Kind Regards,
Lee
1. click object "Tabpane2" to switch tab
2. aqPerformance.Start()
3. wait until tab2 is visible
4. aqPerformance.Check(100)
- Colin_McCrae9 years agoCommunity Hero
Fair point.
If you want proper, granular, mesurements, you might be better off speaking to the dev team and seeing if they can insert timestamps as property values somewhere which are triggered when they hit certain parts of the code. (Which you know relate to population of the new screen)
Then you can just extract and use them at your leisure, no need to worry about how long a search takes etc etc.
I do something similar with browser based load tests. It's about as accurate a measurement as you can get and based on the most true to life possible replication.
Of course, this is all dependent on having a helpful dev team on hand.
- leeasdf99 years agoFrequent Contributor
Hi Baxatob,
Thanks for your input, in my Case I want to measure the exact time how long the tested app. takes to be visible after button click, I still think my order is correct, in your order you also involve performance time of click event.
Kind Regards,
Lee
- Colin_McCrae9 years agoCommunity Hero
exact time how long the tested app. takes to be visible after button click on the current hardware setup
I fixed that for you. :smileywink:
(Reasoning outlined further up. Trust me, I've dealt with people moaning about application performance only to discover they're running it on junk hardware with about a million other things running at the same time .....)
- Colin_McCrae9 years agoCommunity Hero
.
(Double post - removed)