Page 1 of 1

Reading description field of test suite testcase

Posted: Wed Mar 27, 2013 4:13 pm
by Holger-Timm
Hello,

i try to do a Ranorex-Report in Excel. But first step is to collect all needed data of a test-result.

My ExcelLogger class gets following data.
level, category, message, escape and matainfos.

I have a test like in the file "testcase.png".
There you can see on the left side "TelegramDeviceChoiceAdd".
On the gight side you can see "A-**-111-01-TelegrammeGeräteAuswahl".

If i create my report the data of right side is nowhere.
I get only something like:
Info: Test: Test Case 'TelegramDeviceChoiceAdd' started.
Info: Test: Test Case Iteration #1' started.
Info: Test: Test Module 'TestTelegramDeviceChoiceAdd' started.
where Info is from level, Test is from category and rest is from message.

But in no line i get A-**-111-01...
Where is this information hidden. In Ranorex logfile the data exists (testrun.png).
Using Ranorex 3.2.3.

Thanks,

Holger Timm

Re: Reading description field of test suite testcase

Posted: Thu Mar 28, 2013 4:53 pm
by Support Team
Hello,

You have to cast the type of TestCase.Current.
Please try the following line in order to get the description of the current testcase.
var description = TestCase.Current as TestCase;
Report.Info(description.Comment.ToString());
Regards,
Bernhard