Custom xsl

95 views
Skip to first unread message

CLAYTON

unread,
Aug 11, 2012, 7:00:44 AM8/11/12
to robotframe...@googlegroups.com
Hello,

Was wondering if anyone has taken the output.xml file and written a xsl for it to transform it into other formats (html, pdf etc)
Would be interested to see an example, as i'd like to style the output.xml to html using company logo and css.

Thanks,

David

unread,
Aug 28, 2012, 1:07:59 AM8/28/12
to robotframework-users
I'd be interested too. Shouldn't be too hard. I might have done that
but never got around to it and don't work with RF anymore.

Pekka Klärck

unread,
Aug 28, 2012, 7:37:17 AM8/28/12
to clayto...@yahoo.co.uk, robotframe...@googlegroups.com
2012/8/11 CLAYTON <clayto...@yahoo.co.uk>:
>
> Was wondering if anyone has taken the output.xml file and written a xsl for
> it to transform it into other formats (html, pdf etc)

In very early days of Robot Framework, before open sourcing, reports
and logs were actually generated using XSLT. It turned out to be so
slow and memory hungry hungry process, and the XSL syntax itself was
pretty annoying, that we got rid of it. I would expect XSLT engines to
be better nowadays, but I still wouldn't use this approach for
anything too complicated. For showing just some information from the
output it might work well, though.

> Would be interested to see an example, as i'd like to style the output.xml
> to html using company logo and css.

I have actually been thinking that it would be nice to have some
placeholders in report and log where you could inject custom content.
If there was one place in the head section and another in body, you
could add your own styles and other content easily. The usage could be
something like this:

pybot --LogContent head:styles.css --LogContent body:stuff.html tests.txt

This should actually be pretty easy to implement.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Reply all
Reply to author
Forward
0 new messages