Feature tagging
Not only scenarios, the feature file itself can be tagged. Consider the following code to understand how feature files are tagged.
@Signup @TaggedAgain
Feature:
As a user
I want to be able to add new clients in the system
So that i can add accounting data for that client
Background:
Given the user is on landing page
When she chooses to sign up
@Signup-Simple
Scenario: Sign up a new user
And she provides the first name as Sukesh
And she provides the last name as Kumar
And she provides the email as [email protected]
And she provides the password as password
And she provides the confirm password again as password
And she signs-up
Then she should be logged in to the application
@Signup-DataDriven
Scenario Outline: Data driving new user sign-up
And she provides the first name as <firstName>
And she provides the last name as <lastName>
And she provides the email as <email>
And she provides the password as <password>
And she provides the confirm password again as <password>
And she signs-up
Then she should be logged in to the application
Examples:
| firstName | lastName | email | password |
| Sukesh | Kumar | [email protected] | password |
The tagging syntax here is the same as for the scenarios. Also notice that the feature file has 2 different tags. Any feature file or scenario can be tagged more than one time and all the tags should be separated by space.