Re: Stop execution if a test fails on any input from where block
As far as I know, this is not supported by Spock in an obvious way.
However, I consider this a good thing. Knowing in advance all failed
inputs of a parameterized test, would allow you to fix them all at
Otherwise you would need to fix one case, run the test again, see it
fail on another case, fix it, run it again and so on.
If I have a where: block with 100 lines and after a single commit, 73
of them break, I would like to locate them all at once, instead of
having to run the test 73 times in order to see which case fails each
What is your real world scenario?
If by "further tests" you mean other test methods in the same class
that holds the parameterized method, then the @Stepwize annotation
will work as expected. Any error in the parameterized test method,
will skip all other test methods that follow it.
> Hi, I was wondering if there is a way to stop execution if a feature method
> would fail in any of the inputs provided in the where block and shouldn't
> continue with the execution of further tests.
> Help appreciated.
> You received this message because you are subscribed to the Google Groups
> "Spock Framework - User" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at http://groups.google.com/group/spockframework.
> For more options, visit https://groups.google.com/d/optout.