Run Configuration MetaInfo

Ask general questions here.
IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Run Configuration MetaInfo

Post by IanKnight » Wed Feb 17, 2016 10:06 am

Hello,

We currently use a custom Report Logger to log run information to a central database, this works great and does almost everything we need.

However we also extensively use Run Configurations, and I have not found a way to obtain the Run Configuration name during the test run so it can be logged to the database.

Currently I have to log the test suite name alone which is great, but doesn't give me enough granularity of information when I run the same test suite but a different Run Configuration.

So the question I have is how can I find out what Run Configuration has been selected when I am running a test ?

If it is not available during runtime then it is definitely a feature I want to request. I have mentioned it to our Ranorex account manager in the past but not heard any response so I thought I'd try the forum route as well.

Thanks

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Run Configuration MetaInfo

Post by odklizec » Wed Feb 17, 2016 10:13 am

Hi,

If you mean you want to obtain the name of actually selected run configuration, then it's possible via this code...

Code: Select all

string getRunConfiguration = TestSuite.Current.SelectedRunConfig.ToString();
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Re: Run Configuration MetaInfo

Post by IanKnight » Wed Feb 17, 2016 10:56 am

Thanks very much looks exactly like what I want, I will give that a go.

IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Re: Run Configuration MetaInfo

Post by IanKnight » Wed Feb 17, 2016 11:35 am

In the end I used -

TestSuite.Current.SelectedRunConfig.Name.ToString()