Creating your first Step Definitions file
Now let's assume you are an automation developer and you have to implement automated test cases for a Feature file. The next Step in this direction would be to write the Step Definitions for this Feature file. So, how do we write Step Definitions in a Cucumber project? Let's see how to do this in this recipe.
How to do it…
The easiest way to create Step Definitions is to let Cucumber take care of it. The Steps are as follows:
Here is the Feature file used in our previous chapter. Let's use this Feature file to create our first Step Definitions:
Feature: login Page In order to test login page As a Registered user I want to specify the login conditions Scenario: checking pre-condition, action and results Given user is on Application landing page When user clicks Sign in button Then user is on login screen
When you save the Feature file and run (either via Eclipse or via a Terminal), Cucumber is going to give errors for the missing Step...