<!-- HILSTER htf_demo 4.3.1 -->
**HILSTER Testing Framework Demonstrator 4.3.1** · [HTML](../report-tool.html) · [Complete PDF manual](../_downloads/htf_demo-4.3.1.pdf)

# Report Tool

This chapter demonstrates the use of the `report-tool`. Sometimes it is necessary to transform the filetype of a report, or merge reports from multiple test runs together.

You can find more information in the [report-tool documentation](https://docs.hilster.io/htf/latest/report_tool.html#report-tool).

## Merge Reports

To merge test reports from multiple sources you only need to supply the original test reports and specify an output type and filename.

You can use the sample reports located in `report_tool/` to test the feature.

To merge both reports to a `html-report`, run

```bash
cd report_tool
report-tool html_report.html xml_report.xml -H merged_report.html
```

You can find the resulting file in `merged_report.html`.

To merge both reports to a `json-report`, run

```bash
report-tool html_report.html xml_report.xml -x merged_report.json
```

Once again you can find the resulting file in `merged_report.json`.

### Merging test reports

[Download recording](_media/9df685ae41385710.mp4) · [Download transcript](_media/34e36b8d7604f446.txt)

```default
Merging test reports
====================

Visual transcript and walkthrough of the silent recording.
Based on reviewed screen captions/interface actions and the associated written example.

Original recording: demo_reporttool_merging.mp4

1. Change to the report_tool example directory.

2. Run report-tool with the provided HTML and XML test reports and a new output
   filename.

3. The terminal confirms that the merged report has been written.

4. Open the new HTML report to inspect test entries brought together from the input
   reports. The chapter provides the current command syntax.
```

## Change Report Filetypes

To convert the test report and change the filetype, specify the source file and the output format.

To convert a `html-report` to a `xml-report`, run

```bash
report-tool html_report.html -x converted_report.xml
```

The resulting file can be found in `converted_report.xml`.

To convert a single file to all possible report types in one command, run

```bash
report-tool html_report.html -x converted_report.xml -H converted_report.html -j converted_report.json -Y converted_report.yml
```

### Converting a test-report format

[Download recording](_media/8d5cddd009106eda.mp4) · [Download transcript](_media/4043a2a6c587d730.txt)

```default
Converting a test-report format
===============================

Visual transcript and walkthrough of the silent recording.
Based on reviewed screen captions/interface actions and the associated written example.

Original recording: demo_reporttool_converting.mp4

1. Change to the report_tool example directory.

2. Run report-tool with the existing HTML report, the desired XML format, and the output
   filename.

3. The terminal confirms creation of the converted XML report, which also appears in the
   directory view.

4. The chapter provides the current command syntax for selecting input, output, and
   format.
```
