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

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?

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.

2 Likes

Hi,

Already used 3 or 4 .xml at once, and this works well :blush:
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

6 Likes

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?

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

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

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

But what you might need is the 3.4.4 behavior

Regards
Charlie

5 Likes

It worked perfectly. Thank you for the help :slight_smile:

2 Likes

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

Hi,

Totally possible :slight_smile: :

  • Go in the tests folder with cd

  • Then do this :

    rebot --merge --output merged3tests.xml .\test1\output.xml .\test2\output.xml .\test3\output.xml
    

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

image

Regards
Charlie

3 Likes