Where to get the elapsed time for entre suite run

Ask general questions here.
sstowe
Posts: 62
Joined: Thu May 31, 2018 2:26 pm

Where to get the elapsed time for entre suite run

Post by sstowe » Thu Sep 20, 2018 3:27 pm

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

User avatar
jarrettmk
Posts: 16
Joined: Wed Sep 19, 2018 6:10 pm

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

Post by jarrettmk » Thu Sep 20, 2018 9:11 pm

I think this might be what you're after:
var dblElapsed = (double)Ranorex.Core.Reporting.ActivityStack.Instance.RootActivity.ElapsedTime.Milliseconds / 1000;
Jarrett Karyshyn
Quality Assurance & Automation Engineer
USA - EST (UTC−05:00)/EDT (UTC−04:00)
Image