TestReport does not create folders

Bug reports.
Elena
Posts: 13
Joined: Thu Mar 10, 2011 12:47 pm
Location: Copenhagen, Denmark
Contact:

TestReport does not create folders

Post by Elena » Tue Jul 19, 2011 2:57 pm

Hi,

running a line like this:

Code: Select all

TestReport.Setup(ReportLevel.Debug, @"adt\\file1.rxlog", true);
does not produce any report. If I remove the folder part, then the file is generated properly. It also works, if I create folder manually before running the test.

It used to work fine with Ranorex 2.x. Is there something special about the path I should do/write?


Kind regards,
Elena

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: TestReport does not create folders

Post by Ciege » Tue Jul 19, 2011 5:00 pm

I may be mistaken but there looks to be a bug in your line of code.
Using the @ sign tells the compiler to treat every character as it is displayed so the line of code is trying to put two slashes between the folder and file name, which is invalid.
Try removing either the @ sign OR one of the slashes and run it again.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

Elena
Posts: 13
Joined: Thu Mar 10, 2011 12:47 pm
Location: Copenhagen, Denmark
Contact:

Re: TestReport does not create folders

Post by Elena » Wed Jul 20, 2011 7:59 am

I tried removing one of the slashes - same story. Put the slash back and removed @ sign - same thing again. Still no report.

Besides, this used to work perfectly with Ranorex 2.x reporting.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: TestReport does not create folders

Post by Support Team » Wed Jul 20, 2011 12:38 pm

Hi,

In Ranorex 3.x the report method changed and therefore the behavior changed too. With 3.x the TestSuiteRunner creates the folder for the Report. If you want to use the old method your can use Report.Setup() as you know it from 2.x and the folder will be created.
In Ranorex 3.1 there will be a property inside the Test Suite settings to set the folder of the report.

Regards,
Peter
Ranorex Team

Elena
Posts: 13
Joined: Thu Mar 10, 2011 12:47 pm
Location: Copenhagen, Denmark
Contact:

Re: TestReport does not create folders

Post by Elena » Wed Jul 20, 2011 2:36 pm

Thanks for response. I decided to go for Directory.CreateDirectory() instead :)

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: TestReport does not create folders

Post by Support Team » Wed Jul 20, 2011 2:37 pm

This is indeed a good solution. :)

Regards,
Peter
Ranorex Team