How to get test case name using code, while execution : Automation API

How to get test case name using code, while execution

Class library usage, coding and language questions.

How to get test case name using code, while execution

Postby akommalapati » Tue Dec 13, 2011 2:29 pm

Hi,

I have a requirement that i want to read the excel data based on the test case name.
i have reusable actions i want to get the current test case name using code in the reusable actions then get the data from the excel based on the test cases name.

Can u please help me out
akommalapati
 
Posts: 21
Joined: Wed Dec 07, 2011 3:54 pm
Location: India

Re: How to get test case name using code, while execution

Postby Support Team » Tue Dec 13, 2011 3:15 pm

Hi,

the test case name can be accessed using following code snippet within your user code modules:
String name = TestCase.Current.Name;


Kind regards,
Tobias
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: How to get test case name using code, while execution

Postby akommalapati » Wed Dec 14, 2011 12:50 pm

Thanks for the code, worked perfectly.

Thanks
Ajay
akommalapati
 
Posts: 21
Joined: Wed Dec 07, 2011 3:54 pm
Location: India


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests