A QA Automation project developed with Java and Cucumber as Behavior Driven Development
Download and install Eclipse: https://eclipseide.org/
- Launch the Eclipse IDE
- Create a new project by selecting File | New | Other from the Eclipse Main Menu
- On the New dialog, select Maven | Maven Project and click Next
- The New Maven Project dialog will be displayed. Select the Create a simple project (skip archetype selection) checkbox and click on the Next button.
- On the New Maven Project dialog box, enter a group id, an artifact id, a name, a description and click on finish button
- Eclipse will create the Luma project with a structure (in Package Explorer)
- Select pom.xml from Package Explorer
- Add the Selenium WebDriver, TestNG, Cucumber, Cucumber TestNG, PicoContainer and Commons-io dependencies from Maven Repository
- Create “page.objects” and “steps” packages in src/test/java
- Create “drivers” folder in src/test/resources
- Download latest Chrome driver version and copy it to “drivers” folder
- Create “steps” folder in src/test/resources and add a LUMA.feature file
- Create a step definition class in src/test/java/steps “Browser.java”
- Configure the project so it is a cucumber project “Right click > Configure > Convert to Cucumber Project”
- Create runners package in “src/test/java” and add "TestRunner.java" class
- Right click on “TestRunner.java” and “Run as > TestNG Test”