Customize Report

Hello team, do we have the way to customize report for robot framework?

Hi Watanak,

What sort of customisation do you want? progressing from simple to complex:

  • If it’s something simple like formatting the output from a keyword then Log has the capability to inject html into the report

  • For an intermediate level customisation I guess you might be able to get Log to inject a style override css or some custom java script? I’ve not tried this but I guess it might work.

  • For more complex formatting the report is available as XML so you can apply your own XSLT to generate the HTML with what ever layout you want or even just have the HTML page apply the XSLT to the XML in the browser if you want

  • There are other more complex options, most involve programming, but the ones above should cover most of what you would want to do.

It really depends how much customisation you want to do and how much effort you want to spend on it.


Example: I want to add and custom column name in Robot Report. So how can I do it?

Have you looked at GitHub - adiralashiva8/robotframework-metrics: Generation of metrics report based on robotframework output.xml ?
if you have and it didn’t work the expected way, you could try with your custom code with the rf api ! Robot Framework API documentation — Robot Framework 7.0a2.dev1 documentation

Maybe a mix of both would / can do the trick ?


1 Like