Archive for the ‘testing’ Category

Overhead of setUp and tearDown in unit tests

Wednesday, December 3rd, 2008

I was watching the output of my Grails unit tests and noticed that tests using the mockDomain feature of the new Testing Plugin seemed to run just slightly slower than straight up unit tests.  This makes sense, as these tests are doing some meta programming magic to add mock dynamic ...

Added generate-unit-test-case script to Test Template plugin

Sunday, November 16th, 2008

As pointed out in the docs for the Grails Testing Plugin, constraints often contain a lot of logic for your application and are rarely tested. To help out with that, the Test Template plugin now provides a script that will create a stub of a unit test for you for ...

Generated Controller Test Cases

Sunday, November 16th, 2008

The generated controller scaffolding from Grails is a great tool for learning the framework quickly. It provides examples of controllers, controller actions, simple GORM methods on your domain classes, Groovy Server Pages and tag libraries - everything you need to get started - EXCEPT for how to unit test ...

Testing Plugin Presentation

Wednesday, November 12th, 2008

Last night I presented at the Minneapolis Groovy/Grails User Group meeting about the new Grails Testing Plugin created by Peter Ledbrook and G2One.  You can download the presentation in PDF form and browse through the sample code on GitHub (check out the test/unit directory).  The plugin makes it really simple ...

Accurate branch reports with Grails and Cobertura _1.8_

Thursday, January 31st, 2008

I'm trying to figure out why Cobertura coverage reports on my Groovy and Grails code don't show the branch coverage that I expect they should. I noticed that at some point in the past, Cobertura did show a correct branch report. So I tried the grails code-coverage plugin ...