Report Configurations

Class library usage, coding and language questions.
stevenh
Posts: 11
Joined: Wed Sep 05, 2012 9:51 pm

Report Configurations

Post by stevenh » Fri Oct 05, 2012 2:53 pm

Hi,

I was wondering if there was a way to set the Report directory folder through code, instead of setting it through the Test Suite properties window. I would like to do this so that reports can be organized based on what kind of test I am running. I would also like to know if there was a way of reading the location of the report directory being used as well as the name of the actual report rxlog.

Thanks,
Steven

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Report Configurations

Post by Support Team » Mon Oct 08, 2012 1:04 pm

Hi,

You can get the report file name and the folder with the following code:
String path = Ranorex.Core.Reporting.TestReport.ReportFilename;
String folder = new FileInfo(path).Directory.FullName;
For more information about the TestReport class please take a look at the API documentation: TestReport.
When do you want to set the report directory and are you using the test suite?
Do you know that you can run the Ranorex tests from the command line and that it is also possible to set the report file via the command line argument "reportfile|rf:<report file path>"?
Here is a link to the appropriate section of our UserGuide: Running Test via Command Line.
I hope this is what you are searching for!

Regards,
Markus
Ranorex Support Team
.
Image