Let us now implementing a simple cucumber test. We will validate "Gmail invalid login" scenario to understand the test case implementation. I would recommend you to go through my previous post What are Features and Step Definitions in Cucumber? and understand Features file and Step Definitions. Let us go step by step...
- Create a project and adding Jars. Please go through my previous post Downloading Cucumber JVM and Selenium Jars to understand.
- Create Features folder and features file.
- Add a Feature and sample Scenario.
- Create a Test Runner.
- Create Step Definitions package and define steps.
- Run the Test Runner as Junit test.
Step 1: Create a
Project New > Project > select Java Project and click Next. Give the project name as “seleniumCucumberProject” (you can
give any name).