How to setup Cucumber Automation Test Framework and create scripts.

Опубликовано: 14 Октябрь 2024
на канале: Md Shahajada Imran
277
2

In this Tutorial, I explained each steps to setup CUCUMBER Automation Test Framework.
Tools: Cucumber, Selenium WebDriver, eclipse
Language: Java Programming.
Author: md shahajada imran

Steps to follow....
1. Make sure Java JDK is installed and Environment Variables are added.
2. Download eclipse.
3. Add “cucumber Eclipse Plugin” with eclipse.
4. Create a Project (Java/Maven/other)
5. Add jar files and add those in the build path. (If maven then add in the POM xml file)
i. cucumber-core-1.2.5.jar
ii. cucumber-html-0.2.3.jar
iii. cucumber-java-1.2.5.jar
iv. cucumber-junit-1.1.5.jar
v. cucumber-jvm-deps-1.0.3.jar
vi. gherkin-2.12.2.jar
vii. hamcrest-all-1.3.jar
viii. junit-4.11.jar
ix. selenium-server-standalone-3.7.1.jar
6. Add browsers file in a driver folder.
7. Write feacher files. (Automation Script)
a. Keywords are Given, When, Then, And
b. Scenario:, Scenario Outline:, Feature:
8. Write “Step Definition” class.
9. Write reusable java methods in “step definition” class.
10. Execute the feacher files.
11. View the execution result.
12. Write TestRunner Class to execute Test Set or Test Suite.
a. @RunWith annotation.
b. @CucumberOptions annotation
13. Execute the Test Suite.
14. View the execution result.