Almost identical reports - but one doesn't display text

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

Almost identical reports - but one doesn't display text

Post by Elena » Tue Jul 10, 2012 3:27 pm

Hi,

I am currently doing a project, where python calls a DLL, which is produced using C#. That DLL produces a Ranorex Report. I'm upploading 2 reports that have been produced using exactly same code.

I have currently reduced the code to only setup a report, start a suite, case, module, post debug+info messages , log a result and close module, case. (the rest of the code got commented out to make sure it has nothing to do with it).

One report has been produced with logging "Success" as a result, the other one - "Failure". The problem is that the one which passes, doesn't display any info/debug messages, but if i set result to "failure" - all information is displayed correctly.
I have analyzed the two reports with notepad: they look pretty much identical, except that the result is different.

A bit more on code:
DLL contains a single, simple C# class. Python calls the constructor of the class and then calls a method in the class. The setup of Ranorex report + start of suite is done in constructor; opening, closing case/module and posting happens in the method. I have tried setting that method to STA, but didn't change anything.

Finally, I have created a new solution in Visual studio with 2 projects: class library and console application. Class library has exactly same class as the project i'm currently working on. Console then initializes this class and calls the method. In this case, if i set the result to "success" - the report is displayed correctly.


Please let me know if you have any further questions. And if you have any idea for why there's a difference in the way the report is displayed, depending on the result.


Kind regards,
Elena
You do not have the required permissions to view the files attached to this post.

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

Re: Almost identical reports - but one doesn't display text

Post by Elena » Wed Jul 11, 2012 7:51 am

Well, morning obviously is clearer than evening. I manage to find the problem. As mentioned, Python calls methods from DLL. In the beginning of Python script, it calls class constructor. And for some reason, it gets called twice - therefore a nested suite in the report. :roll:

Solution: move constructing of the report into a separate method and call it separately 8)

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

Re: Almost identical reports - but one doesn't display text

Post by Support Team » Wed Jul 11, 2012 3:49 pm

Hello Elena,

Great that you could solve the problem.
Thank you for the information.

Regards,
Bernhard
Ranorex Support Team