Page 1 of 1

Set Report Directory through Code

Posted: Fri Aug 18, 2017 7:27 am
by SteveBeck
Hi ,

As the topic suggests I want to set where Ranorex writes its reports to through code, as I am running an Nunit setup which dynamically runs scripts from Jenkins. I have written code to Create full reports, generating Suites and Modules dynamically from the data provided. but when I look at the ReportDirectory aspects of the TestReport class, all I can do is Get, and when I try to Set it tells me its read only.

Is there a way to set the directory, or should I rather focus on finding all the report files at the end of the test and copying them to my desired location?

Re: Set Report Directory through Code

Posted: Fri Aug 18, 2017 8:13 am
by Stub
No idea about doing so programmatically I'm afraid, but I did use the /rf: and/or /zrf: options on the Ranorex tests .EXE to guide the output to a particular location. I was then able to pick up all of my reports from there.

Re: Set Report Directory through Code

Posted: Tue Aug 22, 2017 12:59 pm
by SteveBeck
Turns out

Code: Select all

TestReport.Setup()
Does the trick, just the doc says it takes an xml which is wrong, set your rxlog path there and it falls in to place.