Set Report Directory through Code

Class library usage, coding and language questions.
SteveBeck
Posts: 19
Joined: Thu Jul 27, 2017 8:27 am

Set Report Directory through Code

Post by SteveBeck » Fri Aug 18, 2017 7:27 am

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?

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Set Report Directory through Code

Post by Stub » Fri Aug 18, 2017 8:13 am

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.

SteveBeck
Posts: 19
Joined: Thu Jul 27, 2017 8:27 am

Re: Set Report Directory through Code

Post by SteveBeck » Tue Aug 22, 2017 12:59 pm

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.