robot.rebot(...) how to merge resultsin python script?

1,091 views
Skip to first unread message

Mauri Jokela

unread,
Feb 15, 2016, 2:31:18 PM2/15/16
to robotframework-users
Howdy

I have searched (googled...) this now two days and I can't figure it out so perhaps I can get some pointers here.

I can succesfully merge two result files in command line by:
rebot --outputdir reports --output Zimulation.xml --merge reports\Zimulation.xml reports\rerun\Sandbox.xml

The merged results appear in Zimulation.xml

Now when I try the same thing in python script, I can not get result files merged.

If I try to convert command line arguments directly, it gives error "[ ERROR ] One or more data source needed.":
robot.rebot(outputdir='reports',output='Zimulation.xml',merge=['reports/rerun/sandbox.xml','reports/Zimulation.xml'])


If I add data source, like this:
robot.rebot('reports/Zimulation.xml',outputdir='reports',output='Zimulation.xml',merge='reports/rerun/sandbox.xml')
the produced result file contains only results in original Zimulation.xml.


Question: how do I merge two result files in python script with robot.rebot(...) ?

Thank you.

-M-

Kevin O.

unread,
Feb 15, 2016, 2:48:06 PM2/15/16
to robotframework-users
I think merge is just an option - its not where you put your data sources. You name all your input files as un-named arguments.
Try:
robot.rebot('reports/rerun/sandbox.xml', 'reports/Zimulation.xml', outputdir='reports', output='Zimulation.xml', merge=True)

Mauri Jokela

unread,
Feb 16, 2016, 1:17:17 AM2/16/16
to robotframework-users
Thank you!

That is how it works, and now it works.

I think I misinterpreted this sentence in rebot.py, I did not think about using merge=True.
.

Options that can be given on the command line multiple times can be
passed as lists like `include=['tag1', 'tag2']`.

br
-M-
Reply all
Reply to author
Forward
0 new messages