Sudhi
Sudhi

Reputation: 11

How to change the structure of output.xml from Robot Framework output

We are passing three text files to pybot and the output generated is in the hierarchical format. For Example, in Test Statistics section of the report.html file, under Statistics by Suite, Test 1 & Test 2 & Test 3.Test 1 is observed. It was changed to display just Test 1 by editing the report.html template file under /usr/local/lib/python2.7/dist-packages/robot/htmldata/rebot .

The log.html template file was also changed to get the desired output like above in log.html file. But I am not finding, where to change to get the desired in output.xml file. The output.xml file still has the format like Test 1 & Test 2 & Test 3.Test 1 . Could someone help to resolve this ?

Upvotes: 1

Views: 3580

Answers (2)

tijnn
tijnn

Reputation: 416

C:\Users\tijne\AppData\Local\Programs\Python\Python38\Lib\site-packages\robot\htmldata\rebot

enter image description here

Upvotes: -1

Bryan Oakley
Bryan Oakley

Reputation: 385980

There is no way to modify the format of the output.xml file that was generated by robot. You have a couple of choices.

First, you can post-process output.xml with xslt or any other tool to transform it into whatever format you want. It's a very simple structure that is easy to parse.

Your second option is to ignore the output.xml and write your own using the listener interface. Through the listener interface you can get a callback for every suite, testcase and keyword where you can write your own output in whatever format you like.

Upvotes: 5

Related Questions