All Projects → shankybnl → selenium_BDD_framework

shankybnl / selenium_BDD_framework

Licence: Apache-2.0 license
Behavioural driven development UI automation framework using selenium, cucumber-java, testng, maven, phantomjs

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to selenium BDD framework

MasterSeleniumFramework
Automation Testing | Web | Java | OOPS | Selenium WebDriver | TestNG | Maven | ExtentReport | Allure Reports | Java mail API | Design Patterns (Page Object Model, Singleton) | Jenkins | Data-Driven Testing using JSON file
Stars: ✭ 52 (+52.94%)
Mutual labels:  maven, testng
Student-Information-Administration-System
大学生信息管理系统——初学路上自己摸索实践的项目
Stars: ✭ 91 (+167.65%)
Mutual labels:  maven, log4j
SeleniumCucumber
BDD framework for automation using Selenium Cucumber and TestNg
Stars: ✭ 48 (+41.18%)
Mutual labels:  testng, bdd-framework
Mobileautomationframework
Single code base framework to test android and iOS app using appium (v6.1.0), maven, testng,java. Option to start appium server programmatically.
Stars: ✭ 66 (+94.12%)
Mutual labels:  maven, testng
sunshine
Sunshine allows you to manage suits of your automated tests directly from Java code.
Stars: ✭ 12 (-64.71%)
Mutual labels:  maven, testng
SeleniumTDD
A Selenium TDD framework that incorporates key features of Selenium and TestNG which can be used to create web-based automation scripts.
Stars: ✭ 23 (-32.35%)
Mutual labels:  maven, testng
kekiri
A .NET framework that supports writing low-ceremony BDD tests using Gherkin language
Stars: ✭ 19 (-44.12%)
Mutual labels:  scenario, bdd-framework
MasterAppiumFramework
Automation Testing | Mobile | Java | OOPS | Appium | TestNG | Maven | ExtentReport | Java mail API | Logging (Log4J2) | Design Patterns (Page Object Model, Singleton) | Page Factories | Jenkins | Data-Driven Testing using JSON file | Expected Data using XML file
Stars: ✭ 27 (-20.59%)
Mutual labels:  maven, testng
manon
🧪 Play with SpringBoot 2, JWT, Querydsl, GraphQL, Docker, ELK, PostgreSQL, MariaDB, Redis, MongoDB, Flyway, Maven, Gradle, TestNG, JUnit5, JaCoCo, GreenMail, CI, Quality Gates, Prometheus, Gatling, etc.
Stars: ✭ 26 (-23.53%)
Mutual labels:  maven, testng
Java.webdriver
Browser test automation using Selenium WebDriver in Java
Stars: ✭ 135 (+297.06%)
Mutual labels:  maven, testng
Spring-SpringMVC-MyBatis-Maven
这是平时基于Maven的用于spring整合相关内容的学习demo
Stars: ✭ 74 (+117.65%)
Mutual labels:  maven
vic2 economy analyzer
Victoria 2 savegame economy analyzer, updated version
Stars: ✭ 44 (+29.41%)
Mutual labels:  maven
gatling-maven-plugin
Gatling Plugin for Maven
Stars: ✭ 30 (-11.76%)
Mutual labels:  maven
qunit-phantomjs-runner
A PhantomJS-powered headless test runner for QUnit
Stars: ✭ 69 (+102.94%)
Mutual labels:  phantomjs
IDEAPractice
Java练习 - Java基础知识,面试题,小demo,长期积累 | intellij idea + maven + tomcat
Stars: ✭ 45 (+32.35%)
Mutual labels:  maven
assembly-examples
assembly-examples
Stars: ✭ 23 (-32.35%)
Mutual labels:  maven
SHAFT ENGINE
SHAFT is an MIT licensed test automation engine. Powered by best-in-class frameworks like Selenium WebDriver, Appium & RestAssured it provides a wizard-like syntax to increase productivity, and built-in wrappers to eliminate boilerplate code and to ensure your tests are extra stable and your results are extra reliable.
Stars: ✭ 170 (+400%)
Mutual labels:  maven
web-crawler
Python Web Crawler with Selenium and PhantomJS
Stars: ✭ 19 (-44.12%)
Mutual labels:  phantomjs
IridiumApplicationTesting
A&G Web Application Testing Suite
Stars: ✭ 19 (-44.12%)
Mutual labels:  scenario
artifact-resolver
Standalone jar executable client Maven 2 artifact resolver based on Eclipse Aether.
Stars: ✭ 13 (-61.76%)
Mutual labels:  maven

selenium_BDD_framework

Behavioural driven development automation framework using selenium, cucumber-java, testng, maven, phantomjs

Tools and technologies used:

  1. Language: Java 8
  2. Testing framework: Testng
  3. BDD framework: Cucumber jvm
  4. Automation tool: Selenium webdriver
  5. Build tool: maven
  6. Logging: log4j
  7. Headless browser: Phantomjs
  8. Reporting: cucumber reporting

Features of the framework

  1. BDD framework using Cucumber-jvm. Feature files can be written easily using Given,When, Then etc.
  2. Browser(chrome/firefox) can be configured at run time from command line (or Continuous integration tool, if configured).
  3. Tests can run in headless browser (Phantomjs) by passing a parameter at run time.
  4. Screenshot would be taken if any scenario failed and saved under /outputFiles folder.
  5. Html report gets generated after each test run and can be found /target/cucumber-html-report/index.html

package: libs : It has exe of chromedriver and phantomjs. This is required while creating the webdriver session.

image

package: features : It contains all different features (tests) files.

image

package: framework : It includes the common classes (and methods) which are required by each test to perform actions. Below are classes in this package:

image

Assertions.java : It contains assertion methods like verifyEquals,screenshot etc. These can be used in any of the helper files to verify the actual result with expected result.

CommonMethods.java : It is a common repository for all the webdriver methods which are used in every class present under logic package to perform actions like click, findElement etc. Every new method which is being used in logic classes should be added in this class as well. It is to reduce the duplicate code. Each page class extends this class.

CreateSession.java : All the methods to create a new session and destroy the session after the test(s) execution is over.

TestRunner.java : Features/tests to be executed are defined in this class. Other test configurations are also defined here.

package: logger : It contains Log.java class which contains methods to show the logs on console and save the logs in LogFile.txt of each run.

image

package: logic : contains all the classes where actions and assertions happens.

image

pakage: outputFiles : All the output files will be stored here (screenshots/csv/txt files)

image

package: pages : It has web elements corresponding to the specific page which is used by corressponding logic classes.

image

Test report

Once test execution is completed, go to target/cucumber-report folder and open feature-overview.html file

image

You can see the test results at different level

image

Setting up the project

Install the maven and clone the build then:

$ cd selenium_BDD_framework

$ mvn clean install

Execution of tests

There are 2 scenarios named as @scenario1 and @scenario2. Ran the tests on chrome54.0, firefox46 on ubuntu 14.04 64 bit

To run both scenarios (@scenario1 and @scenario2) (by default browser would be chrome):

$ mvn test

To run test with configurable browser (for firefox, use -Dbrowser=firefox)

$ mvn test -Dbrowser=chrome

To run tests headlessly

$ mvn test -Dheadless=yes

To run specific scenario:

$ mvn test -Dcucumber.options="--tags @scenario2"

To run multiple mentioned scenarios:

$ mvn test -Dcucumber.options="--tags @scenario1,@scenario2"

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].