Quantcast

Power assert formatting in junit reports

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Power assert formatting in junit reports

Shin Tai
I gave Spock a go after seeing a talk at the London GGUG and I really
like the power assert stuff it puts in the junit reports. But the
formatting is a bit off so I modified xsl that comes with junit to
make the output a little more aligned.

To get it working you need Grails 1.2.1+. Edit
scripts/_GrailsTest.groovy and set junitReportStyleDir to the
directory that will contain the xsl (e.g. junitReportStyleDir =
"test/styles"). Then put the attached xsl into your chosen directory.
I haven't touched the no-frames xsl but I don't think that gets used
anyway.

I've only written a few unit tests so far and it seems fine. So I
don't know if it breaks the formatting of a whole suite of tests.

If someone tell me a better way of overriding something in
_GrailsTest.groovy that'd be ace.

Shin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

xsl.zip (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Power assert formatting in junit reports

Peter Niederwieser
Adapted stylesheets are also available from here (just one line changed from the originals): http://code.google.com/p/spock/source/browse/#svn/trunk/config/ant-junit

Since plain Groovy now also has power asserts, it would make a lot of sense if Grails used a modified stylesheet by default.

Cheers,
Peter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Power assert formatting in junit reports

ld@ldaley.com

On 19/08/2010, at 5:11 AM, Peter Niederwieser wrote:

> Adapted stylesheets are also available from here (just one line changed from
> the originals):
> http://code.google.com/p/spock/source/browse/#svn/trunk/config/ant-junit
>
> Since plain Groovy now also has power asserts, it would make a lot of sense
> if Grails used a modified stylesheet by default.

The next releases of Grails will support this out of the box.

http://jira.codehaus.org/browse/GRAILS-6635
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...