It can often be useful to convert Ranorex Studio reports to other file types, such as PDF. You can convert it manually with a tool provided by Ranorex. However, if you want to automate this process, the ReportToPDFModule in the Automation Helpers is a great help.
It automatically converts your report to PDF. You can use it with the default settings or customize it.
Default usage
-
Drag the module to the desired test container. Everything up to this point will be included in the PDF report. Everything after it won’t be included.
Once you finish a test run with the module, the default HTML report will display the results as usual and also include an After Test Suite section.
-
A warning is shown for the five unbound variables. You can ignore it.
-
The section After Test Suite displays that the report was successfully converted to PDF and can be opened by clicking Open PDF.
For default usage, the PDF file itself is in the Reports folder of the output folder of your test solution.
Custom usage
As hinted at above, the module comes with five predefined variables that are used to customize the way the module creates the PDF version of the report.
To use these variables for customization, you need to either create a data source that contains possible customization values or create parameters with these values. You then bind each value to the respective variable.
Data sources, parameters, and data binding are explained in Ranorex Studio fundamentals > Data-driven testing
Here are the variables and which values they accept:
PdfName
File name for the PDF report.
If left empty, the default report name consisting of the test solution name, date, and time is used.
Does not accept the report name placeholders normally available (e.g. %T, %D. %M, %Y, etc.).
PdfDirectoryPath
Path to an existing folder you want to save the PDF report to. If left empty, the report folder in the output folder is used.
XML
Path to an XML stylesheet (*.xsl) for the PDF. If left empty, automatically searches for an XSL file in the output folder.
Details
Possible values: none, failed, all (default). Determines what information the PDF report contains.
DeleteRanorexReport
Possible values: true, false (default). Determines whether the default HTML report is deleted automatically after the test. If set to true, the default HTML report will still be displayed after the test run has finished, but only from the machine’s RAM. It will not be saved to the hard disk.