[Development] Adding duration to xml test output

Frederik Gladhorn frederik.gladhorn at digia.com
Tue Nov 19 18:42:10 CET 2013


Hi all,

I'd be interested if anyone uses the xml output from qtestlib.
(I hope you do, it's the nicest way to get structured output from your tests). 

The reason is that I'd like to add a new duration element which contains the 
time of test funtion/total test run in milliseconds.
It adds <duration msecs=1234/> for each test function and the test in total.

My only concern is that if many people use the xml with broken xml parsers 
that hickup when a new tag is added we'd be breaking everyone's test 
infrastructure.
(adding the duration as attribute would require major refactoring of the code 
in question, something I don't have time for)

https://codereview.qt-project.org/#change,69205
and maybe someone knows how to write xsl better than me, please add comments:
https://github.com/gladhorn/xunit-plugin/commit/b31a0cd7003cb2af67efdf3950deca2d323bc914

For Qt's own test setup this is no problem as the Jenkins plugin used already 
does a sensible xslt that transforms our custom xml to xunit output.

So if you think this will be a major problem, please let me know, otherwise 
I'll try to get us nice new metrics :)

-- 
Best regards,
Frederik Gladhorn
Senior Software Engineer - Digia, Qt
Visit us on: http://qt.digia.com




More information about the Development mailing list