Page 1 of 1

Two Report (Log) formats appearing

Posted: Wed Oct 24, 2012 10:12 pm
by LPG
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

Re: Two Report (Log) formats appearing

Posted: Wed Oct 24, 2012 10:31 pm
by Ciege
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

Re: Two Report (Log) formats appearing

Posted: Wed Oct 24, 2012 11:07 pm
by LPG
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.

Re: Two Report (Log) formats appearing

Posted: Wed Oct 24, 2012 11:40 pm
by Ciege
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.

Re: Two Report (Log) formats appearing

Posted: Thu Oct 25, 2012 7:32 am
by artur_gadomski
If you're missing TestReport.Setup you will also get old style reporting by default.

Re: Two Report (Log) formats appearing

Posted: Thu Oct 25, 2012 2:18 pm
by LPG
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 :)

Re: Two Report (Log) formats appearing

Posted: Thu Oct 25, 2012 3:21 pm
by LPG
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?

Re: Two Report (Log) formats appearing

Posted: Thu Oct 25, 2012 4:20 pm
by Support Team
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

Re: Two Report (Log) formats appearing

Posted: Thu Oct 25, 2012 4:47 pm
by LPG
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).

Re: Two Report (Log) formats appearing

Posted: Fri Oct 26, 2012 12:13 pm
by Support Team
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

Re: Two Report (Log) formats appearing

Posted: Sat Oct 27, 2012 3:42 pm
by LPG
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!

Re: Two Report (Log) formats appearing

Posted: Mon Oct 29, 2012 11:31 am
by Support Team
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