Is there a way to generate robot framework output.xml file from log.html

Viewed 888

Is there a way to generate robot framework output.xml file from log.html I work in regression team where we store log.html as to have future reference, but if i do want to have XML file back, is it possible to generate from log.html

REBOT is to generate log and reports from xml. Do we have any similar modules or packages that we can use to retrieve xml from log.html

2 Answers

Is there a way to generate robot framework output.xml file from log.html

Robot does not provide a way to do that. Though, since log.html is HTML, you can write your own tool to do the conversion.

I work in regression team where we store log.html as to have future reference

The smarter solution is to store the XML since that is the source of truth for test results. By storing it, you can easily regenerate the log.html and report.html files whenever you need them.

You can use robot's rebot command to recreate the log and report files:

$ python -m robot.rebot output.xml 
Log:     /tmp/log.html
Report:  /tmp/report.html

We can use the below one.

rebot --name 'automation' -o results/output.xml -d results/results/result_xml/excel*.xml

you need to run this from where your log files present

Related