Create a small sample cucumber test for careers group page.
Cucumber framework has been selected by their capability to display human readable instructions in the tests (gherking language); combined with Selenium to easy locate elements in a powerful faster headless browser, using JUnit for assertion results; getting as a result an automated report.
This framework has been designed AND integrated with Travis CI.
- IDE: *Intelij IDEA Comunity 22020.2.4
- *Java with package (JDK 1.11)Baseline Programming Language
- Main Frameworks:
- *Cucumber framework 6.10.0
- *Selenium for 3.141.59
- *JUnit 4.13.2
- *Maven compiler 3.8.1
Note: Maven project will download automatically those framework external libraries based upon the dependencies in pom.xml file.
- src > test > resources > io > cucumber > features
- searchPositions.feature -> feature file with a simple position search in Adidas Careers website.
- theEndToEndScenario.feature --> feature file with a scenario where user applies for two positions
- visaRequirements.feature --> an edge case where user applies for two positions but different constraints
- src > test > java > io > cucumber > stepDefinitions
- SearchPositions.java
- RunCucumberTest.java
- Remark: other step definitions are not defined to not compromise logged in profiles and create defect applications in Adidas database
In order to provide a clear functional framework, the structure has been settup as below:
- Install Intelij
- Import project folder as a Maven project
- Go to path src > test > java >io > cucumber > stepDefinitions > RunCucumberTest.java
Open Intellij, Go to Settings -> Plugins, Choose to install Cucumber for JAVA plugin, and Gherking plugin. You might need to restart the IDE.
The quickest way of running Cucumber tests is by using the icons in the gutter next to the necessary feature or scenario.
View steps to run here