The ReportToPDFModule automatically converts your Ranorex Studio reports into PDF files. You can use this module with default settings or apply custom configurations to change the report content and storage location.
Default usage
Drag the ReportToPDFModule from the Module browser into a test container. The module converts everything recorded in the report up to the point of its execution.
When the test finishes, the standard HTML report displays a success message in the After Test Suite section. Click Open PDF to view the file.
- The report shows a warning for five unbound variables. You can ignore these for default usage. These variables are for customizing the way Ranorex creates the PDF.
- The After Test Suite section displays a success message and the option to Open PDF.
By default, Ranorex saves the PDF in the Reports folder within your test solution's output directory.
Custom usage
The module contains five predefined variables that you use to customize the PDF generation.
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. For more information, see Data-driven testing.
The variables are the following:
| Variable | Description |
| PdfName |
Specifies the file name for the PDF report. If you leave this empty, the application uses the default report name consisting of the test solution name, date, and time. 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 you leave this empty, the application uses the report folder in the output folder. |
| XML | Path to an XML stylesheet (*.xsl) for the PDF. If you leave this empty, the application 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 displays after the test run has finished, but only from the machine’s RAM. It is not saved to the hard disk. |