Get Test Suite Name

Ask general questions here.
upmashruti
Posts: 2
Joined: Thu Sep 14, 2017 10:34 am

Get Test Suite Name

Post by upmashruti » Thu Sep 14, 2017 10:38 am

How to get the test suite name of the current test suite?
This is not working: TestSuite.Current.Name.ToString();
Error Displayed: Object reference not set to an instance of an object.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Get Test Suite Name

Post by krstcs » Thu Sep 14, 2017 1:45 pm

Take a look at the Ranorex API: https://www.ranorex.com/Documentation/Ranorex/
Shortcuts usually aren't...

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Get Test Suite Name

Post by Stub » Fri Sep 15, 2017 8:33 am

Have you determined which part is null? I'm going to guess you're running your code module directly from the Ranorex Studio editor individually, rather than from the TestSuite. Therefore there is no current TestSuite.

upmashruti
Posts: 2
Joined: Thu Sep 14, 2017 10:34 am

Re: Get Test Suite Name

Post by upmashruti » Fri Sep 22, 2017 3:39 am

Thank you. I was running the code module directly, rather than from Test Suite.