Git Product home page Git Product logo

frameworkium-bdd's Introduction

FRAMEWORKIUM & CUCUMBER-JVM

This is a demo/poc project demonstrating integration of Frameworkium with Cucumber-JVM using the Page Object model With Page Factory pattern

Test Execution:

There is a test that fails so that reports with a failure can be seen, to runn only passing tests use the cucumber tag @pass

Concurrent
  • run all tests from command line: mvn clean test
  • run specific tagged tests (eg @test1) from command line: mvn clean test -DCucumber.options="--tags @test1
  • run tests from within IDE by running the RunCukesTest.class as a Junit test, to run specific tags change the tag in the 'tags = "~@ignore"' part of the @CucumberOptions parameter at the top of the class
Parallel

parallel execution is done at the feature level, feature files are run in Parallel not Scenarios first you will need the selenium grid up and running and a node, I did it with chrome by running these commands in separate terminal windows on a windows machine:

Hub: java -jar path\\to\\selenium-server-standalone-2.48.2.jar -role hub Node: java -jar path\\to\\selenium_grid\\selenium-server-standalone-2.48.2.jar -role webdriver -browser "browserName=chrome, version=45, maxInstances=5, platform=windows" -port 5555 -Dwebdriver.chrome.driver=path\\to\\chromedriver.exe

Now add the -Dgrid-test argument to the previously seen command line command: mvn clean test -Dgrid-test

Reports

  • There will be cucumber html reports generated in taget\cucumber for parallel execution there will be a separate report generated for each feature
  • For allure reports run mvn site and open the target\site\allure-maven-plugin\index.html file

Further Documentation

Please Refer to documentation for information on the following:

Other Points

  • All Page object classes with containing Page Objects are initialised before the tests by using the selenium Page Factory - this avoids the need for declaring in step classes the PO classes then initialising them from within steps which can get very messy or having to use new everytime you make a call to a page object class from within steps. After the PO are initially initialised the Frameworkium PageFactory DI is used (using @Inject on PO class constructors) which makes sure all pages are loaded as we move from page to page etc
  • for parallel execution we generate a separate runner class for each feature file using a plugin
  • the standard cucumberjvm.AllureRunListener for the allure reports is not compatible with TestNG so the TestNG dependency from frameworkium has been excluded and Junit has been used
  • WebdriverUtils class is used to wrap all webdriver functionality which is then in turn called by all PO classes

frameworkium-bdd's People

Contributors

ham1 avatar

Watchers

Ashley Noronha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.