Grouping

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Grouping

stephanos-2
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

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: Grouping

Peter Niederwieser
Administrator
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

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: Grouping

stephanos-2
That's wonderful! Thanks for the quick and solid feedback :-)

On Feb 16, 12:15 pm, Peter Niederwieser <[hidden email]> wrote:

> 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

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.