Page 1 of 1

how to get the running time of an application?

Posted: Thu Oct 27, 2011 11:13 am
by huixiao
hello,i want to get the running time of an application.For example ,i added an action of Run Application in a Module for running an exe,how can i get the running time of the exe? i need your help.best regards.

Code: Select all

Report.Log(ReportLevel.Info, "Application", "Run application with file name from variable $SolutionPath with arguments '' in normal mode.", new RecordItemIndex(1));
Host.Local.RunApplication(SolutionPath, "", "", false);//i wan to get the running time
Delay.Milliseconds(0);

Re: how to get the running time of an application?

Posted: Thu Oct 27, 2011 11:54 am
by Support Team
Hi,
huixiao wrote:ow can i get the running time of the exe?
One possible solution would be to use the .Net Framework Stopwatch. Therefore please take a look to following link http://msdn.microsoft.com/en-us/library ... watch.aspx

Or if you want to know how long your test was running, please use the Duration of the Report.

Regards,
Peter
Ranorex Team