Get log file (rxlog) for test case only

Ranorex Spy, Recorder, and Studio.
dj91
Posts: 4
Joined: Mon Apr 24, 2017 10:33 am

Get log file (rxlog) for test case only

Post by dj91 » Mon Apr 24, 2017 10:59 am

Hello,

we want to establish a test automation setup with Ranorex and TestRail. We use TestRail for test case management and have a checkbox to mark any test which can be automated with Ranorex. This way we can easily find out which task needs to be tested manually.

So far I am able to report test results from Ranorex to TestRail. However, in case of a failed test case we need some information about the test run.

The only thing I was able to come up with is a custom field in TestRail in which I report the location of a Ranorex log file (rxzlog) on a network drive.

What I want for this is a rxlog file for each single test case. Currently, every test case reports to TestRail with the location of the log file, but of course it also contains information about all previous test cases. I have a code module "Prepare for Test Reporting" which is the first setup step of every test case and "Report to Test Management" as the last teardown step in every test case.

Is there a way to "restart" the log file after every test case? Ideally there would be a log file for every failed test case (my code module decides to only write the log file to the location if the case failed) but also one which holds the complete result of the test run.

What I've got so far:

Report.Start() and Report.End(), but they don't seem to do anything (I guess leaving out Report.Start() would result in no log file after Report.End() has been called?)

Report.Setup() creates a log file specific to the currently executed test case, but there is no useful information. It basically only reports which modules have been executed and their result.

I was also playing around with TestReport.BeginTestCaseContainer(), but seems to just append the log file.

Any help would be appreciated!

Thanks,

Dominik

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Get log file (rxlog) for test case only

Post by qwertzu » Tue Apr 25, 2017 3:10 pm

Hello dj91,

I think the easiest way to get a report file for each test case would be to run each test case independently. You can setup test run configurations for each one and run them via command-line. If you name the report file well, you shouldn't have any problems with over-writing.

Furthermore, please take a look at the following link with a similar topic: how-to-split-a-report-in-single-testcases-t6573.html

regards,

qwertzu

dj91
Posts: 4
Joined: Mon Apr 24, 2017 10:33 am

Re: Get log file (rxlog) for test case only

Post by dj91 » Tue Apr 25, 2017 3:49 pm

Hello quertzu,

wouldn't this defeat the purpose of run configurations?

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Get log file (rxlog) for test case only

Post by qwertzu » Wed Apr 26, 2017 3:13 pm

Hi dj91,

Run configurations simply define which test cases will be executed during a test.
And since they can be run via command line, it's an easy way to reach your goal.

regards,

qwertzu