We are using Ranorex 7.2 libraries to write test cases through Visual Studio 2015. We are successful so far in implementing use case for our Java Swing application
Query : We are trying to convert our test case execution result report (*.rxlog) into PDF format, so that everyone in our team can read them without having Ranorex Report Viewer installed. To accomplish this we did write following code snippet,
// Stop Report Report.End(); var reportFileDirectory = TestReport.ReportEnvironment.ReportFileDirectory; var ReportName = TestReport.ReportEnvironment.ReportName; var rxlogFile = String.Format(@"{0}\{1}.rxlog", reportFileDirectory, ReportName); var rxzlogFile = String.Format(@"{0}\{1}.rxzlog", reportFileDirectory, ReportName); var PDFReportFilePath = String.Format(@"{0}\{1}.pdf", reportFileDirectory, ReportName); TestReport.SaveReport(); // Create rxzlog file Report.Zip(rxlogFile, reportFileDirectory, ReportName); // Create PDF file Creator.CreatePDF(rxzlogFile, PDFReportFilePath, "", "all");Problem :
But above wasn't successful, and what we are getting from above code is below,
Ranorex.Core.FastXml.XmlDocException : Element 'activity' does not exist in element 'activity'.
06:11:16 at Ranorex.Core.FastXml.XmlNode.Child(String name)
06:11:16 at Ranorex.PDF.PDFCreator.CreateHeader(XmlNode rootActivity)
06:11:16 at Ranorex.PDF.PDFCreator..ctor(XmlNode rootNode, String xml, RanorexGraphics rg)
06:11:16 at Ranorex.PDF.Program.Main(String[] args)
06:11:16 at Ranorex.PDF.Creator.CreatePDF(String input, String output, String xml, String details)
Note : When i try the above same code with Test Suite in Ranorex Studio, its working as expected - meaning it is generating pdf of test results.
But in our case, we are using nunit to run our tests and we do not have any Test Suite kind of stuff.
Could someone please guide me on how to resolve this issue and help me to generate pdf of our test case execution results
Many thanks in advance!
- Saravanan