Forgus / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

It would be handy to have a "global" where-block for @stepwise specifications #285

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Within a @Stepwise annotated specification it would be very convenient to have 
a central, spec-wide where block to be able to define dataproviders for larger 
specs, which then will be used run whole spec parameterized

could be in the setup methods or special method with a certain annotation

Original issue reported on code.google.com by kl...@jumio.com on 22 Nov 2012 at 9:48

GoogleCodeExporter commented 8 years ago
I think that not only makes sense for stepwise specifications.

It would be great to have spec wide parameterization like it's possible with 
JUnit parameterized tests. In our case we'd like to test multiple targets 
against a common spec consisting of multiple tests. As instantiating these 
targets is expensive, it doesn't make sense to iterate data driven over the 
targets for every single test. Instead there could be a @Shared def target that 
only changes per global spec iteration.

Original comment by carsten....@codecentric.de on 15 Jul 2014 at 1:01

GoogleCodeExporter commented 8 years ago
It definitely makes sense as a general feature, but designing and implementing 
it won't be trivial. If you are interested in contributing, please let us know.

Original comment by pnied...@gmail.com on 15 Jul 2014 at 1:07