[JVM][RUBY] Get tags of Examples in Scenario Outline

29 views
Skip to first unread message

Sergey Ermakov

unread,
Feb 8, 2016, 7:17:54 PM2/8/16
to Cukes
Hello everyone.

I'm calabash and appium developer. And I'm using cucumber for both of these technologies. And one day I found out that I couldn't get tags from Examples in Scenario Outline.

Ex:
@featureTag
Feature: Let it be the feature

 
@scenarioTag
 
Scenario Outline: Let it be the scenario outline
 
Given <number> step

 
@exampleTag1
 
Examples:
 
| number |
 | one    |

 
@exampleTag2
 
Examples:
 
| number |
 | two    |




So, If I try to get all tags of first scenario example it will return only  @featureTag and @scenarioTag, but not @exampleTag1. And it is very important to me to get all three. How can I get them?

How I get tags:
RUBY:
scenario.scenario_outline.source_tag_names

Java:
scenario.getSourceTagNames()



Eric Kessler

unread,
Feb 9, 2016, 11:19:57 AM2/9/16
to Cukes
I'm guessing that it is because you are asking the outline object and the example tag isn't not part of the outline. Is it possible to drill down further and get at the example object instead and then ask it what its tags are? I would expect it to return all three tags because it is affected by all three whereas the outline is only necessarily affect by two of them.


Eric Kessler 
Reply all
Reply to author
Forward
0 new messages