Unit Tests

Mark Kretschmann kretschmann at kde.org
Wed Oct 28 19:22:02 CET 2009


Heya,

thanks to Sven Krohlas and Google (Summer of Code), we do have unit
tests in Amarok now. However, I think we're not really using them to
their full potential yet. Mainly that's because using them is a bit
awkward, as the output is a fairly unreadable blob of raw XML.

So I went ahead and wrote a HTML generator for that. It's a tiny Ruby
script, with the actual heavy lifting being done by a XSL
transformation. The output isn't exactly beautiful yet (we can still
polish it), but it's world ahead of parsing that XML with your eyes.
Here's some example output generated by my script:

http://mark.kollide.net/amaroktest/Amarok.html

This paves the way for my ultimate goal: Running the unit tests every
night on a server, and then posting the results somewhere, or maybe
even sending us a mail if there are critical regressions. Kevin
offered to use his server for that, so I think we're almost good to
go. My feeling is that once we have set this up we will start to use
the unit tests much more, as it won't be a big hassle any more. So,
should we go ahead with this plan?


PS:
Here's my script, and the XSL style sheet (XSL rocks!), if you want to
check it out:

http://gitorious.org/amarok/amarok/trees/master/tests/htmlgenerator

-- 
Mark Kretschmann
Amarok Developer
www.kde.org - amarok.kde.org


More information about the Amarok-devel mailing list