Page 1 of 1

Issues with ReportToPDF

Posted: Tue Mar 01, 2016 6:06 pm
by wcrockett
Hello all,

I have added the DLL to my project, and set the compile version. Additionally, I have added the ReportToPDF.CS to my project. I have added a tear-down step to an existing test and added the CS module to it. When ran, no PDF is generated and in the tear-down step, no output is given as seen in the CS file.

Is there something more to the ‘installation’ of this package or am I seeing some anomaly of sorts?

For the record, the test I am using this for is 100% user code with no UI interaction… It does still give a report output though.

-Wes

Re: Issues with ReportToPDF

Posted: Tue Mar 01, 2016 6:18 pm
by krstcs
I believe you need to add the lines of code that call the PDF writer in the Program.cs file.

The report must be finished before it can be transformed, and it isn't finished if the test suite is still being executed. Therefore, you can't put it in the test suite at all, it must be in Program.cs, after the "TestSuiteRunner.Run(...);" call as the report is finalized at the end of the Run method, right before it returns to Main.

Re: Issues with ReportToPDF

Posted: Tue Mar 01, 2016 7:25 pm
by wcrockett
krstcs wrote:I believe you need to add the lines of code that call the PDF writer in the Program.cs file.

The report must be finished before it can be transformed, and it isn't finished if the test suite is still being executed. Therefore, you can't put it in the test suite at all, it must be in Program.cs, after the "TestSuiteRunner.Run(...);" call as the report is finalized at the end of the Run method, right before it returns to Main.
I suppose this makes sense in terms of where code belongs, but it really doesn't line up with the main walk through on doing this. (http://www.ranorex.com/blog/ranorex-rep ... conversion)

The code that I see, which comes in the comments, is the following:

Code: Select all

public static void Ranorex.PDF.Creator.CreatePDF(string input, string output, string xml, string details)
Whenever I put this in my program.cs, I get compile errors.

Re: Issues with ReportToPDF

Posted: Thu Mar 03, 2016 2:27 pm
by krstcs
Can you include the error? It's a little hard to know what's going on without it.

Re: Issues with ReportToPDF

Posted: Fri Mar 04, 2016 8:12 am
by Support Team
Hello,

I'm already in conact with Wes, we will update the post as soon as we find a solution. :)

Sincerely,
Robert