{"id":13721336,"url":"https://github.com/rahulrathore44/SeleniumCucumber","last_synced_at":"2025-05-07T13:32:51.017Z","repository":{"id":51685822,"uuid":"65663376","full_name":"rahulrathore44/SeleniumCucumber","owner":"rahulrathore44","description":"BDD framework for automation using Selenium Cucumber and TestNg","archived":false,"fork":false,"pushed_at":"2023-11-12T11:45:32.000Z","size":23778,"stargazers_count":97,"open_issues_count":0,"forks_count":120,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-31T11:21:12.616Z","etag":null,"topics":["bdd-framework","cucumber-framework","cucumber-reporting","selenium-cucumber","selenium-java","selenium-webdriver","testng"],"latest_commit_sha":null,"homepage":"https://www.udemy.com/user/rahulrathore3/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rahulrathore44.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-14T11:36:46.000Z","updated_at":"2025-02-10T22:50:43.000Z","dependencies_parsed_at":"2024-09-24T01:30:50.960Z","dependency_job_id":"be75afb4-5a4e-44e1-a4a0-bc0e73485940","html_url":"https://github.com/rahulrathore44/SeleniumCucumber","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.53125,"last_synced_commit":"7394ef7c3eb4b5ad88213a62ab41d84789ff0940"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulrathore44%2FSeleniumCucumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulrathore44%2FSeleniumCucumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulrathore44%2FSeleniumCucumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulrathore44%2FSeleniumCucumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahulrathore44","download_url":"https://codeload.github.com/rahulrathore44/SeleniumCucumber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252886912,"owners_count":21819804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdd-framework","cucumber-framework","cucumber-reporting","selenium-cucumber","selenium-java","selenium-webdriver","testng"],"created_at":"2024-08-03T01:01:15.693Z","updated_at":"2025-05-07T13:32:45.980Z","avatar_url":"https://github.com/rahulrathore44.png","language":"Java","funding_links":[],"categories":["Tools"],"sub_categories":["Java"],"readme":"### Selenium Framework with Cucumber\n\nBDD framework for automation using Selenium Cucumber and TestNg\n\nThe framework has following features \n\n1. Modular Design\n2. Maven based framework\n3. Log4j enabled for logging\n4. Report Generation (cucumber-reporting) \n5. Helper class to handle web component such as (Button,Link etc)\n6. Centralized Configuration (Using Properties file)\n7. POM\n8. Hooks for different browser support (using tag @chrome,@firefox...)\n\n### YouTube Playlist\n\n- **Cucumber Framework** https://www.youtube.com/playlist?list=PLlsKgYi2Lw73j-yB8SBzrUBpMYL1Jr3M7\n- **TestNg** https://www.youtube.com/playlist?list=PLlsKgYi2Lw73Cs109qNoAc-V0rDnXzpAY\n\n### Here is the basic code:\n\nTo use the class for handling the web component create the object and use it\n\n```java\n\tGridHelper grid = new GridHelper(driver);\n\tgrid.typeInGrid(item,GridLocator.cartId,1,1,qty);\n```\n\n### Add the Feature file \n\nAdd the feature file under `test\\resources\\featurefile`\n\n```java\nFeature: Adding a laptop to the Cart\n\n  @chrome\n  Scenario: Search Laptop and add it to the cart\n    Given : I am at the home page\n    When : I click on the \"Laptops\" search filter\n    Then : I should be at the \"Laptops\" search page with \"35 items\"\n    And : The title should be \"Laptops\" search page\n    Then : I select the \"APPLE MacBook Pro Retina\" with description as \"15-inch, 256GB\"\n    And : Add it to the cart\n    Then : Navigate to user details page and provide the following details\n      | Destination | Singapore  |\n      | Airline     | AirAsia    |\n      | FlightNo    | A089       |\n      | FlightDate  | 24/08/2016 |\n      | FlightTime  | 5:00       |\n      | Terminal    | Terminal 1 |\n      | FirstName   | Selenium   |\n      | LastName    | Java       |\n      | Email       | sq@j.com   |\n      | Phone       |  121212121 |\n```\n\nuse the tag `@chrome` to launch the specific browser or no-tag to use the browser form the `config.properties` file\n\n### Create the Runner\n\n```java\n/**\n * @author rahul.rathore\n *\t\n *\t14-Aug-2016\n */\npackage com.cucumber.framework.runner;\n\nimport cucumber.api.CucumberOptions;\nimport cucumber.api.testng.AbstractTestNGCucumberTests;\n\n@CucumberOptions(features = { \"classpath:featurefile/Search.feature\" }, glue = {\n\t\t\"classpath:com.cucumber.framework.stepdefinition\",\n\t\t\"classpath:com.cucumber.framework.helper\" }, plugin = { \"pretty\",\n\t\t\"json:target/SearchFeatureRunner.json\" })\npublic class SearchFeatureRunner extends AbstractTestNGCucumberTests {\n}\n``` \n\n### Use the testng.xml file to run the test cases\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE suite SYSTEM \"http://testng.org/testng-1.0.dtd\"\u003e\n\u003csuite name=\"Suite\"\u003e\n\t\u003clisteners\u003e\n\t\t\u003clistener\n\t\t\tclass-name=\"com.cucumber.framework.listeners.reportlistener.CucumberReport\" /\u003e\n\t\u003c/listeners\u003e\n\t\u003ctest name=\"Test - 1\"\u003e\n\t\t\u003cclasses\u003e\n\t\t\t\u003cclass name=\"com.cucumber.framework.runner.SearchFeatureRunner\" /\u003e\n\t\t\t\u003cclass name=\"com.cucumber.framework.runner.LaptopFeatureRunner\" /\u003e\n\t\t\t\u003cclass name=\"com.cucumber.framework.runner.TabletFeatureRunner\" /\u003e\n\t\t\t\u003cclass name=\"com.cucumber.framework.runner.SearchWithFilterRunner\" /\u003e\n\t\t\u003c/classes\u003e\n\t\u003c/test\u003e\n\u003c/suite\u003e \n```\n\n### To see this whole thing running simply checkout this project and run this command:\n\n`mvn clean generate-sources test`\n\n### Cucumber Report\n\nThere is a feature overview page:\n\n![feature overview page](https://github.com/damianszczepanik/cucumber-reporting/raw/master/.README/feature-overview.png)\n\nAnd there are also feature specific results pages:\n\n![feature specific page passing](https://github.com/damianszczepanik/cucumber-reporting/raw/master/.README/feature-passed.png)\n\nAnd useful information for failures:\n\n![feature specific page passing](https://github.com/damianszczepanik/cucumber-reporting/raw/master/.README/feature-failed.png)\n\nIf you have tags in your cucumber features you can see a tag overview:\n\n![Tag overview](https://github.com/damianszczepanik/cucumber-reporting/raw/master/.README/tag-overview.png)\n\nAnd you can drill down into tag specific reports:\n\n![Tag report](https://github.com/damianszczepanik/cucumber-reporting/raw/master/.README/tag-report.png)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrathore44%2FSeleniumCucumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulrathore44%2FSeleniumCucumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrathore44%2FSeleniumCucumber/lists"}