Robot Framework - Pabot - Rebot Merge Error : [ ERROR ] Reading XML source '/reports/outputxunit1.xml' failed:

Viewed 23

I need help to solve this rebot merge error :

Here is my code :

pabot --testlevelsplit --pabotlib --exclude not_ready --include mytest -x outputxunit1.xml --output original.xml --outputdir reports/ --reporttitle APITests /bin/e2etest || 

pabot --testlevelsplit --pabotlib --exclude not_ready --include mytest -x outputxunit2.xml --rerunfailed /reports/original.xml --output rerun.xml --outputdir reports/ --reporttitle APITests /bin/e2etest || 

rebot --outputdir /reports -R --xunit outputxunit.xml /reports/outputxunit1.xml /reports/outputxunit2.xml 

Pabot tests run fine. But in the end I get the following error :

[ ERROR ] Reading XML source '/reports/outputxunit1.xml' failed: Incompatible root element 'testsuite'.  

How to merge the outputxunit files without any errors?

1 Answers

You cannot merge xunit xml with rebot. To accomplish what you are trying to do, you have to first merge original output.xm files and than use rebot to create xunit from the merged output. The commands can possibly be in one line, but the input for robot should be original xml.

rebot -o merged.xml --merge original.xml rerun.xml

rebot -x mergedxunit.xml merged.xml
Related