Grouping

18 views
Skip to first unread message

stephanos

unread,
Feb 16, 2010, 5:33:17 AM2/16/10
to Spock Framework - User
Hi,

I like your framework a lot!
Yet one thing I can't figure out is how to create "groups" (e.g.
annotating a few methods across packages that take a very long time to
run with @Big and run them separately) - is that possible?

Cheers,
stephanos

Peter Niederwieser

unread,
Feb 16, 2010, 6:15:15 AM2/16/10
to spockfr...@googlegroups.com
Hi stephanos,

On 16.02.2010, at 11:33, stephanos wrote:

> Hi,
>
> I like your framework a lot!

Thanks!

> Yet one thing I can't figure out is how to create "groups" (e.g.
> annotating a few methods across packages that take a very long time to
> run with @Big and run them separately) - is that possible?

This will be possible in 0.4, and is already available in the latest 0.4 snapshots. You need to create a SpockConfig.groovy file with this content:

import my.pkg.Slow

runner {
include Slow
}

'Slow' can be a base class or (in this case more likely) an annotation type. Apart from 'include', you can also specify 'exclude'.
In order for Spock to find your configuration file, you can either save it in the default location ~/.spock/SpockConfig.groovy, or point to it with a Java system property: '-Dspock.configuration=/path/to/SpockConfig.groovy'

Cheers,
Peter

stephanos

unread,
Feb 16, 2010, 8:44:10 AM2/16/10
to Spock Framework - User
That's wonderful! Thanks for the quick and solid feedback :-)
Reply all
Reply to author
Forward
0 new messages