How to exclude tests in Geb? How to exclude tests in Geb? selenium selenium

How to exclude tests in Geb?


Since you're using spock, you can use @IgnoreIf at the class or method level.

Here's a good article on it: http://mrhaki.blogspot.com/2014/06/spocklight-ignore-specifications-based.html

Since you have a system property for it, you should just be able to plug it right in:

@IgnoreIf({ !System.properties.containsKey("test.include.slow") })


You're on the right track but you should put that runner configuration code in SpockConfig.groovy and not GebConfig.groovy as it is Spock specific configuration.