Page 1 of 1

Where to get the elapsed time for entre suite run

Posted: Thu Sep 20, 2018 3:27 pm
by sstowe
In my log file for my suite run I see:

Duration
56.95s

I have code in which I am trying to determine the run duration.

double dblElapsed = (double) Ranorex.Core.Reporting.ActivityStack.Current.ElapsedTime.Milliseconds / (double) 1000;

The values are different. I can readily imagine the ActivityStack here refers to one test in the suite or some such. But I cannot see how to iterate through the stack or get the elapsed time for the suite.

Anyone?

Thank you

Re: Where to get the elapsed time for entre suite run

Posted: Thu Sep 20, 2018 9:11 pm
by jarrettmk
I think this might be what you're after:
var dblElapsed = (double)Ranorex.Core.Reporting.ActivityStack.Instance.RootActivity.ElapsedTime.Milliseconds / 1000;