GithubHelp home page GithubHelp logo

paulrajgithub / cucumber-testng-parallel-selenium Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kowalcj0/cucumber-testng-parallel-selenium

1.0 2.0 1.0 192 KB

An example project that shows how to run Cucumber tests in multiple browsers simultaneously using Selenium and TestNG

Java 95.17% Gherkin 4.83%

cucumber-testng-parallel-selenium's Introduction

This example project is based on few other projects:

It allows you to run Cucumber features (tests/scenarios) in multiple browsers simultaneously using Selenium (WebDriver) and TestNG.

Running features in IDE

Tested in IntelliJ Idea 13.1.1 To run all stories from IDE only in Firefox, simply right click on one of the files:

  • cucumber.examples.java.testNG.runners.RunCukesTestInChrome
  • cucumber.examples.java.testNG.runners.RunCukesTestInFirefox

And chose "Run ..." (Yes, choosing RunCukesTestInChrome will also run tests in FF!)

To run all stories simultaneously in both browsers (Chrome and Firefox) right click on one of the files:

  • src/test/resources/TestNGRunTestsLocally.xml
  • src/test/resources/TestNGRunTestsRemotely.xml

And chose "Run ..."

To run just one selected feature, change the feature name in the class below:

cucumber.examples.java.testNG.runners.RunSingleFeature

And as in previous example, right click on this class and chose "Run ..."

Running features from CLI

Run tests using local browsers:

mvn clean install

Run tests using browsers running on remote nodes:

mvn clean install -P runTestsRemotely

Viewing the results

All Cucumber reports [html, json, xml, js] are in: target/cucumber-report

How to download WebDriver binaries automatically

This project is using Mark Collin's "selenium-standalone-server-plugin" which is a Maven plugin that can download WebDriver binaries automatically. Once you configure the plugin to your liking, then:

mvn clean install -P downloadDriverBinaries

The pom.xml is currently configured to download only a Chrome driver binary for 64bit Linux OSes. If you can't download desired driver binary, then check if its URL and checksum specified in:

src/main/resources/RepositoryMapForMavenWebDriverBinaryDownloaderPlugin.xml

are correct. If not, then modify this file accordingly.

Jenkins configuration

I'll add a tutorial later

tools that need to be installed on the Jenkins Host machine

maven 2/3

List of useful plugins

AnsiColor Cucumber json test reporting. cucumber-perf cucumber-reports GIT client plugin GIT plugin Hudson Locks and Latches plugin Maven Integration plugin SSH Credentials Plugin TestNG Results Plugin Xvfb plugin

cucumber-testng-parallel-selenium's People

Contributors

kowalcj0 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

coolqa

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.