How to get execution time between two events?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2012
11:41 PM
11-18-2012
11:41 PM
How to get execution time between two events?
Hi,
I want to measure the time between two operation in a script using testComplete. For example, if I pressed search button then how much time it is taking to give search result. The application is a desktop application and the result will be displayed in the same window.
Thanks,
Nmanne
I want to measure the time between two operation in a script using testComplete. For example, if I pressed search button then how much time it is taking to give search result. The application is a desktop application and the result will be displayed in the same window.
Thanks,
Nmanne
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2012
04:03 AM
11-20-2012
04:03 AM
Hi Narender,
I think you could either use the StopWatch object if you have the HISUtils plug-in or use the aqDateTime object.
In the first case:
funcion Test()
{
var stpWatch = HISUtils.StopWatch;
StopWatch.Start();
MySearchOperation();
StopWatch.Stop();
Log.Message ("Difference in times: " + StopWatch.ToString());
}
In the second case:
function Test()
{
var startTime = aqDateTime.Time();
MySearchOperation();
var stopTime = aqDateTime.Time();
var diffTime = aqDateTime(startTime, stopTime);
//Difference in times (Days:Hours:Minutes:Seconds)
Log.Message( aqConvert.TimeIntervalToStr(diffTime));
}
For more specifics, please check TestComplete help.
I think you could either use the StopWatch object if you have the HISUtils plug-in or use the aqDateTime object.
In the first case:
funcion Test()
{
var stpWatch = HISUtils.StopWatch;
StopWatch.Start();
MySearchOperation();
StopWatch.Stop();
Log.Message ("Difference in times: " + StopWatch.ToString());
}
In the second case:
function Test()
{
var startTime = aqDateTime.Time();
MySearchOperation();
var stopTime = aqDateTime.Time();
var diffTime = aqDateTime(startTime, stopTime);
//Difference in times (Days:Hours:Minutes:Seconds)
Log.Message( aqConvert.TimeIntervalToStr(diffTime));
}
For more specifics, please check TestComplete help.
