Page 1 of 1

Output test result (pass/fail) and a number to text file

Posted: Fri Jul 05, 2013 10:23 am
by cdmartinus
Hi,

I am trying to get Ranorex to output the result of a test (pass or fail) along with a variable that will be a number (e.g. 49) to a simple text file, each on a separate line.

I think Ranorex is a great tool but I'm quite new to it so any help would be appreciated.

Thanks!!

Re: Output test result (pass/fail) and a number to text file

Posted: Mon Jul 08, 2013 3:59 pm
by Support Team
Hello,

I am not exactly sure what you want to do, but if you want to get the status of a test case you can use the following code snippet.
Ranorex.Core.Testing.TestCase.Current.Status
In order to write your variable into a text file I would recommend to use the "System.IO" namespace of the .NET Framework. Please take a look at the link below.
http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx

Regards,
Bernhard