@David, Thanks for the reply. I'll try this out.

On Tue, Dec 5, 2017 at 9:28 PM, J. David Beutel <[email protected]> wrote:

> This is more of a Spock question.  I can't compare with TestNG or Maven,
> but here's a good example of using @IgnoreIf:
>
> http://mrhaki.blogspot.com/2014/06/spocklight-ignore-
> specifications-based.html
>
> Here's OP's question and answer:
>
> https://stackoverflow.com/questions/29127169/tag-geb-
> classes-tests-for-exclusion
>
> There are various ways you could do it.  The best approach depends on how
> you want to run your tests.  I used an IGlobalExtension to exclude specs
> that were not annotated, because I had problems with the classpath in Spock
> config files on Grails 1 & 2.
>
> Instead of that, if you can run it with a "spock.configuration" system
> property, and your build system supports the config classpath properly,
> then you could use multiple Spock config files (regression, smoke, etc)
> with include and exclude by corresponding annotations or marker interfaces:
>
> http://spockframework.org/spock/docs/1.1/all_in_one.
> html#_spock_configuration_file
> http://spockframework.org/spock/docs/1.1/all_in_one.
> html#_include_and_exclude
> http://mrhaki.blogspot.com/2015/08/spocklight-including-or-excluding.html
> http://mrhaki.blogspot.com/2015/08/spocklight-include-or-exclude.html
>
> By the way, for regression tests, Spock already has an annotation, @Issue,
> that may be useful:
>
> http://spockframework.org/spock/docs/1.1/all_in_one.html#_issue
>
> Cheers,
> 11011011
>
> On 2017-12-05 04:10 , dwpal via Geb User Mailing List wrote:
>
> @J. David Beutel
>
> I am new to Geb Spock with maven. I want to tag my tests for regression,
> smoke etc, in a simple manner like in TestNG. If you could explain how I
> could use IgnoreIfExtension in my case will be helpful.
>
> Thanks!!
>
> On Thursday, March 19, 2015 at 2:19:04 AM UTC, [email protected] wrote:
>>
>> @Bob Brown & @J. David Beutel
>> I google crawled both those resources while trying to find a solution.
>> At one point I did create and jar three annotations; @Smoke, @Regression,
>> @InProgress.  The issue with this is the code base does not really have a
>> static set of tags.
>>
>> The situation I am in is that we currently use a functional testing suite
>> (ThoughtWorks' Twist) which allows for our QAs to easily tag integration
>> tests and be able to run a subset of tests by the tags.  They use any
>> number of tags ranging from smoke, regression, inprogress, wip (work in
>> progress), dates, story card numbers from our card wall for reference,
>> etc.  Additionally, not all the groups in the shop are required to use the
>> same tags for the most part the QA team is not what you would call
>> "java/groovy" proficient.
>>
>> Given the preceding, having an alternative suite that allows similar
>> functionality in as easy a manner as possible, I feel, greatly increases
>> the chances of the QAs adopting the alternative suite.
>>
>>
>> @J. David Beutel
>> Much appreciation for pointing out the IgnoreIfExtension.  Once pointed
>> in this direction I was able follow the styling of IgnoreIfExtension and
>> IgnoreIf and create classes "IgnoreUnlessExtension" and "IgnoreUnless"
>> which take in an array of strings and checks if the "functional.tag"
>> environment variable is in preset, and if not performs the skip option so
>> the tests are ignored, which is what I was after!  :D  Don't think I need
>> the custom SpockConfig.groovy file now.
>>
>> I'll document this on stack overflow tomorrow and give you credit.
>> Again, must appreciated.  And thanks all for the replies.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Geb User Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/geb-user/0c40445b-ae71-4e6d-8589-b2e009849e58%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/0c40445b-ae71-4e6d-8589-b2e009849e58%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Geb User Mailing List" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/geb-user/MHrMWvFa8EQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/geb-user/d3e67107-c4d0-2800-92a1-85e63f4d42a0%40getsu.com
> <https://groups.google.com/d/msgid/geb-user/d3e67107-c4d0-2800-92a1-85e63f4d42a0%40getsu.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CAB6zq8V936aQWHOMh4%2Brcd7RBKW2xHSJUkU_1XYYKDNLTgWMCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to