https://github.com/anshul-sonpure/cucumber_tutorials
This a Cucumber project for those who want to learn Cucumber and performs some hands-ons. Feel free to clone the repo and make changes as per your learning/requirements.
https://github.com/anshul-sonpure/cucumber_tutorials
automated-testing bdd bdd-style-testing-framework cucumber cucumber-framework gherkin java selenium-webdriver
Last synced: 4 months ago
JSON representation
This a Cucumber project for those who want to learn Cucumber and performs some hands-ons. Feel free to clone the repo and make changes as per your learning/requirements.
- Host: GitHub
- URL: https://github.com/anshul-sonpure/cucumber_tutorials
- Owner: Anshul-Sonpure
- Created: 2022-01-12T12:50:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T07:52:14.000Z (about 3 years ago)
- Last Synced: 2025-10-07T18:45:59.264Z (8 months ago)
- Topics: automated-testing, bdd, bdd-style-testing-framework, cucumber, cucumber-framework, gherkin, java, selenium-webdriver
- Language: Java
- Homepage: https://medium.com/@theautobot/how-to-build-a-robust-automation-framework-with-cucumber-and-selenium-ebcc8984fdc5
- Size: 8.46 MB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cucumber_Tutorials
Hi All,\
This a Cucumber project for those who want to learn Cucumber and performs some hands-ons.
Feel free to clone the repo and make changes as per your learning/requirements.
This is a maven based project so all you need to do is clone the project in your IDE and\
run -- `mvn clean install`.
About this project, we have all the Features in Features folder and corresponding stepdefinitions in\
src/test/java/stepdefinitions folder.\
TestRunner class in present in src/main/java/TestRunner named as CucumberRunner.\
### Some basics of Cucumber
#### What Is Cucumber?
Cucumber lets you write test scenarios using plain language.
It is a tool for behavior-driven development (BDD). BDD is a software development process that encourages cross-functional collaboration, in part, through use of a plain-English scripting language called “gherkin” that anyone, technical or not, can read, write, and understand.
The tests are first written in a simple scenario form that describes the expected behavior of the system from the user’s perspective.\
Cucumber includes the following three files:\
1. Feature file: Here we write the Features to be tested in Gherkin format i.e. Given When Then. We can even run the feature file to execute the test scripts written in the Stepdef file.
2. Stepdef file: Once the Feature file is ready, each sentence of the Feature file can be further implemented over the Stepdef file.
3. Runner File: This is just to execute the actual test script written over the Stepdef file by referring to the feature file. Apart from that, it has many other options for customization, reporting, selective execution, etc.\
In our project I have created 6 Feature files based on few **Cucumber** concept.In the feature file I've mentioned what concept we are going to implement and test.\
However just for update in this project I have tried to make clear concepts like.
- Login.feature --> implements the concept of Background.
- RegisterUser.feature --> implements the concept of DataTables
- Scenario_Outline.feature --> implements the concept of Scenario Outline and Example keyboard.
- CaptureGroup.feature --> implements the concept of capture group.
- Hooks.feature --> implements the concept of Hooks where we have used @Before and @After
- Tags.feature --> implements the concept of Tags @smoke,@regression and @prodfix
**Note:** If you clone this repo and run it you will notice browser is getting opened twice and that is because we have used Hooks and also we have implemented the concept of inheritence where we called driver from DriverUtils package.This is because I dont want to implement everything in a single file 🤭. Rest everything is fine and working.\
Also sharing my book on Cucumber and PPT's from my course.
Thank You\
Happy Coding,\
Learn,Code and Earn\
Stay Safe and Stay Positive :)