Using Cucumber tags

37 views
Skip to first unread message

Litha K

unread,
Feb 16, 2012, 3:57:55 PM2/16/12
to Cukes
Hi,

I am using tags at feature level and also at scenario level. In one of
my feature file I have got tags at both levels:
--------------------------------
@test_tag
Feature 1

@sub_tag
Scenario 1:

@sub_tag
Scenario 2:
---------------------------------
@test_tag
Feature 2

@test_tag
Feature3

....and so on..
----------------------------------

In my cucumber.yml file I have got:

test_profile: --tags @test_tag --tags @sub_tag


My understanding was that test_profile will run both @test_tag and
@sub_tag, however it runs only @sub_tag and ignores the feature files
which has just got @test_tag.

Any thoughts on this please?

Thanks,
Kay

Alex Klimenkov

unread,
Feb 16, 2012, 5:02:58 PM2/16/12
to cu...@googlegroups.com, Litha K
Hi,

You could try to write with comma:

    test_profile: -t @test_tag,@sub_tag

"Runs Scenarios with @important OR @billing"

https://github.com/cucumber/cucumber/wiki/Tags
-- 
Alex

Skype                  alexandr.klimenkov

Litha K

unread,
Feb 16, 2012, 5:52:25 PM2/16/12
to Cukes
Nice one, Thank you!

On Feb 16, 10:02 pm, Alex Klimenkov <alexander.klimen...@warecorp.com>
wrote:
Reply all
Reply to author
Forward
0 new messages