# Merging Test Reports and Creating a Single "report.html"

**URL:** <https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461>\
**Category:** Robot Framework\
**Created:** [21 June 2024 10:39 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461 "2024-06-21T10:39:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![KPrasad](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@KPrasad](https://forum.robotframework.org/u/KPrasad)\
**Post date:** [21 June 2024 10:39 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/1 "2024-06-21T10:39:45Z")

</div>

I have a long-running test suite that I split and run in parallel across different jobs in GitLab. I would like to know if it is possible to merge the results generated and create a single report. I have around 10 jobs and their corresponding results to merge. Can I use rebot for this?

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [21 June 2024 13:02 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/2 "2024-06-21T13:02:34Z")

</div>

Yes, you can. Are the files with different names, or all named `output.xml`?  
I don’t know if you can use rebot to merge 10 outputs at once, I only did for two outputs. Maybe you need to make a chain of merged outputs.

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [21 June 2024 16:36 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/3 "2024-06-21T16:36:11Z")

</div>

Hi,

Already used 3 or 4 .xml at once, and this works well 😊  
I would say the only limit will be the ressources upon files sizes.  
And of course the fact that root/suite structure is the same between files.  
You can also lighten the files with --removekeywords and --flattenkeywords in the same --merge command. I often do this but create a new merged.xml file

Regards.  
Charlie

---

<div class="post-metadata">

**Author:** ![KPrasad](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@KPrasad](https://forum.robotframework.org/u/KPrasad)\
**Post date:** [26 June 2024 12:34 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/4 "2024-06-26T12:34:46Z")

</div>

HI,  
Thank you for your response.  
I noticed when merging test results from multiple suites, I see duplicate entries, especially in the headers, which makes the final report cluttered and difficult to read. Is it possible to avoid it?

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [26 June 2024 18:11 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/5 "2024-06-26T18:11:06Z")

</div>

Hi,

Do you have an example?

If the root suite is not the same you might not be able to merge at all, but if following structure is not exactly the same there it will merge but could “duplicate”.  
For example:  
Tests.Dir1.Subdir1.Test1  
Tests.Dir2.Subdir1.Test1

Do you have some mismatch like this in the suite structure?

Regards  
Charlie

---

<div class="post-metadata">

**Author:** ![KPrasad](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@KPrasad](https://forum.robotframework.org/u/KPrasad)\
**Post date:** [26 June 2024 19:07 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/6 "2024-06-26T19:07:04Z")

</div>

Yes. The root suite is same.  
example  
Test.ABC.Post.robot  
Test.DEF.Get.robot  
Test.GHI.Put.robot  
In the test report, repo name is repeated.  
TestRepo&TestRepo&TestRepo Report

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [26 June 2024 19:33 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/7 "2024-06-26T19:33:06Z")

</div>

Hi again,

OK I see. Already had that once. Can you confirm you use the --merge parameter, and not just the rebot command:

```
rebot --merge --output merged.xml file1.xml file2.xml file3.xml

```

If you don’t use --merge it’s combining as in 3.4.3 here, creating new top-level suite each time:

[https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-489](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-489)

But what you might need is the 3.4.4 behavior

Regards  
Charlie

---

<div class="post-metadata">

**Author:** ![KPrasad](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@KPrasad](https://forum.robotframework.org/u/KPrasad)\
**Post date:** [26 June 2024 20:07 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/8 "2024-06-26T20:07:09Z")

</div>

It worked perfectly. Thank you for the help 🙂

---

<div class="post-metadata">

**Author:** ![shirae-sys](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/shirae-sys/32/4204_2.png) [@shirae-sys](https://forum.robotframework.org/u/shirae-sys)\
**Post date:** [13 September 2024 05:02 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/9 "2024-09-13T05:02:52Z")

</div>

Hi Charlie,

I have the same situation but I have same output.xml to be merged and they are in different folder. I think I could not catch up if this different directory with same file output.xml name can be merge with rebot or not.

root\logs\tests\test1 output.xml  
root\logs\tests\test2 output.xml  
root\logs\tests\test3 output.xml

Could you explain a little bit more how can i merge those output.xml

Regards,  
Shahirah

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [13 September 2024 13:51 UTC](https://forum.robotframework.org/t/merging-test-reports-and-creating-a-single-report-html/7461/10 "2024-09-13T13:51:51Z")

</div>

Hi,

Totally possible 🙂 :

- Go in the tests folder with cd

- Then do this :

It will create the merged files in the tests folder directly has --outputdir is not specified:

![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/b/bec6830d012f4975b6791a3aeae7f8cce5173753.png)

Regards  
Charlie
