Two Report (Log) formats appearing

Ask general questions here.
LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Two Report (Log) formats appearing

Post by LPG » Wed Oct 24, 2012 10:12 pm

We have a Ranorex solution with a few projects. The Report (log) produced by 1 of these projects look different thanf or the other projects, and I am very puzzled why. I'm sure this is a simple setting somewhere, but I've been unable to figure it out.

The "usual", standard report shows the test case breakdown, the number of tests succeeded/failed, and you can jump to the different script lines directly from within the report. But this one offending project report does not have any of that ...
* It does NOT show the test case breakdown, but rather all the output in one window.
* It does NOT show the number of tests failed/succeeded at the top.
* No jump.
* One more difference: it does not show the project name at the top, but instead the title is "Ranorex Test Report".

See attached pictures, showing both these report formats.

We have not changed versions, these projects were all created on the same version. There is also no custom report format loaded.

Thanks
Attachments
TestCaseBreakdownFormat.JPG
Test Case Breakdown Format
TestCaseBreakdownFormat.JPG (45.43 KiB) Viewed 1348 times
TestReportFormat.JPG
Test Report Format
TestReportFormat.JPG (33.36 KiB) Viewed 1348 times

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

Re: Two Report (Log) formats appearing

Post by Ciege » Wed Oct 24, 2012 10:31 pm

Thats the new and old report formats respectively...

Somewhere in your test code you must have used the old style report in that project... Look for some code similar to

Code: Select all

Report.Setup
The new report style is generated with code similar to

Code: Select all

Ranorex.Core.Reporting.TestReport.Setup
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...

LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Re: Two Report (Log) formats appearing

Post by LPG » Wed Oct 24, 2012 11:07 pm

I was wondering if it is perhaps some old format. Searching the code, I could find no reference to "Report.Setup", or even just "Setup". :(

I suspect the cause of this is going to be a needle in a haystack to find! And once it is solved, it will seem so obvious ... but right now, I'm just totally puzzled.

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

Re: Two Report (Log) formats appearing

Post by Ciege » Wed Oct 24, 2012 11:40 pm

Do you use the Ranorex Studio for your automation? Not sure if there is a setting in there that can affect the report style.

All of my automation is done through Visual Studio so I control the report styles through Ranorex API calls.
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...

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: Two Report (Log) formats appearing

Post by artur_gadomski » Thu Oct 25, 2012 7:32 am

If you're missing TestReport.Setup you will also get old style reporting by default.

LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Re: Two Report (Log) formats appearing

Post by LPG » Thu Oct 25, 2012 2:18 pm

Arthur, from what I can see, all the Program.cs files for the different projects contains a line:
"using Ranorex.Core.Reporting;"
But none of them (even the successful projects) specifically refer to "TestReport.Setup". In the code, I print reports using "Report.Error ... " or "Report.Info" etc. This is used consistently like that. I would assume that the "using Ranorex.Core.Reporting" line should be sufficient for all of them to get the same reports?

Yes, I use Ranorex Studio. I suspect you are right, Ciege, I'm probably missing a setting somewhere ... but to find it! :) I've compared all Property and Options screens between the projects that produces the right reports, and the "offending" project, and I don't see anything different.

Thanks for trying to help though. I'll have to keep digging, but I appreciate the input :)

LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Re: Two Report (Log) formats appearing

Post by LPG » Thu Oct 25, 2012 3:21 pm

Ranorex Support, do you perhaps have some ideas? I just realized an additional (and even more puzzling) piece of information to this issue that may or may not shed some light.

Turns out that I get the old report version for the "offending" project only on 1 computer. When I check out the same solution on a different computer, and run this "offending" project, I get the NEW report format!

To summarize the bizarre issue in short:
* Ranorex solution consists of about 10 projects. One of these projects (only 1) produces the OLD report on ONE computer only. The other 9 produces the NEW report (which is what I want).
* On 2 other computers, the "offending" project produces the NEW report.
* Same solution is checked out on all these computers.

It almost seems that it is something environmental on my development computer. However, since 9 of the 10 projects produces the NEW report on my computer, I'm not so sure if that theory makes sense :) How would some environmental setting only affect one project out of 9?

Any thoughts?

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

Re: Two Report (Log) formats appearing

Post by Support Team » Thu Oct 25, 2012 4:20 pm

Hello,

You should have 'TestSuiteRunner.Run...' in your 'Program.cs' file in order to use the new report style format.
If you log messages before this function call you will get reports in old style format.

Could you please verify your 'Program.cs' file in your projects?
Do you use a custom XSL file in your test suite?

Regards,
Markus (T)
Ranorex Support Team
.
Image

LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Re: Two Report (Log) formats appearing

Post by LPG » Thu Oct 25, 2012 4:47 pm

Yes, all the Program.cs files for all the projects have 'TestSuiteRunner.Run...', and no messages are logged before that. Yet, one project's report still produces the old one ... only on 1 computer.

No custom XSL's are used anywhere. But even if there were, that would not explain the inconsistent behavior of this report on different computers (using the same checked out solution).

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

Re: Two Report (Log) formats appearing

Post by Support Team » Fri Oct 26, 2012 12:13 pm

Hi,

Is there such a code somewhere in your project?
// set a custom stylesheet for the default XML report           
XmlLogger.SetReportStylesheetFile("RanorexReport.xsl");
// OR:
Report.Setup(ReportLevel.Info, "Test.rxlog", true);
On the one computer you get the "old" report, are there any custom plugins installed, i.e. are there any DLL files in the following directory?
C:\ProgramData\Ranorex3\Plugins

Regards,
Markus
Ranorex Support Team
.
Image

LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Re: Two Report (Log) formats appearing

Post by LPG » Sat Oct 27, 2012 3:42 pm

Aha, you got it!
There was no reference to the old report format in my code, nor was I using any custom report.
However, I did have a "Ranorex.Plugin.Office.dll" in the Plugin folder. Last week I was trying to use Excel to copy/paste values to/from Excel into our application. After deleting the dll from the Plugins folder, I did not get the old report format anymore. And my scripts using Excel also still works fine.

Well, the problem is solved for me. I do wonder though: do you expect the old report format to show up if you have the Office plugin in the Plugins folder?

Thanks!

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

Re: Two Report (Log) formats appearing

Post by Support Team » Mon Oct 29, 2012 11:31 am

Hi,

It seems that you used an older Office plugin and you therefore got the old styled report.
The old styled report is used if you are using an older plugin and if a report message is logged by the plugin (could be a debug message) before the "normal" report is initialized.

Regards,
Markus
Ranorex Support Team
.
Image