- Notifications
You must be signed in to change notification settings - Fork121
BDD framework for automation using Selenium Cucumber and TestNg
License
rahulrathore44/SeleniumCucumber
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
BDD framework for automation using Selenium Cucumber and TestNg
The framework has following features
- Modular Design
- Maven based framework
- Log4j enabled for logging
- Report Generation (cucumber-reporting)
- Helper class to handle web component such as (Button,Link etc)
- Centralized Configuration (Using Properties file)
- POM
- Hooks for different browser support (using tag @chrome,@firefox...)
- Cucumber Frameworkhttps://www.youtube.com/playlist?list=PLlsKgYi2Lw73j-yB8SBzrUBpMYL1Jr3M7
- TestNghttps://www.youtube.com/playlist?list=PLlsKgYi2Lw73Cs109qNoAc-V0rDnXzpAY
To use the class for handling the web component create the object and use it
GridHelpergrid =newGridHelper(driver);grid.typeInGrid(item,GridLocator.cartId,1,1,qty);
Add the feature file undertest\resources\featurefile
Feature:AddingalaptoptotheCart@chromeScenario:SearchLaptopandaddittothecartGiven :IamatthehomepageWhen :Iclickonthe "Laptops"searchfilterThen :Ishouldbeatthe "Laptops"searchpagewith "35items"And :Thetitleshouldbe "Laptops"searchpageThen :Iselectthe"APPLE MacBook Pro Retina"withdescriptionas"15-inch, 256GB"And :AddittothecartThen :Navigatetouserdetailspageandprovidethefollowingdetails |Destination |Singapore | |Airline |AirAsia | |FlightNo |A089 | |FlightDate |24/08/2016 | |FlightTime |5:00 | |Terminal |Terminal1 | |FirstName |Selenium | |LastName |Java | |Email |sq@j.com | |Phone |121212121 |
use the tag@chrome to launch the specific browser or no-tag to use the browser form theconfig.properties file
/** * @author rahul.rathore * *14-Aug-2016 */packagecom.cucumber.framework.runner;importcucumber.api.CucumberOptions;importcucumber.api.testng.AbstractTestNGCucumberTests;@CucumberOptions(features = {"classpath:featurefile/Search.feature" },glue = {"classpath:com.cucumber.framework.stepdefinition","classpath:com.cucumber.framework.helper" },plugin = {"pretty","json:target/SearchFeatureRunner.json" })publicclassSearchFeatureRunnerextendsAbstractTestNGCucumberTests {}
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPEsuite SYSTEM "http://testng.org/testng-1.0.dtd"><suitename="Suite"><listeners><listenerclass-name="com.cucumber.framework.listeners.reportlistener.CucumberReport" /></listeners><testname="Test - 1"><classes><classname="com.cucumber.framework.runner.SearchFeatureRunner" /><classname="com.cucumber.framework.runner.LaptopFeatureRunner" /><classname="com.cucumber.framework.runner.TabletFeatureRunner" /><classname="com.cucumber.framework.runner.SearchWithFilterRunner" /></classes></test></suite>
mvn clean generate-sources test
There is a feature overview page:
And there are also feature specific results pages:
And useful information for failures:
If you have tags in your cucumber features you can see a tag overview:
And you can drill down into tag specific reports:
About
BDD framework for automation using Selenium Cucumber and TestNg
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.




