BDD Selenium Framework that integrates Cucumber.js with Nemo.js & SauceLabs Cloud, and Parallel executions
- Cucumber BDD Framework
- Supports latest Selenium 3 & Cucumber 2
- Pretty HTML reports with Pie-charts
- Parallel Executions of Cucumber Scenarios and/or Features
- Selenium Page Objects; auto initialized
- Multi-browsers/platforms coverage with SauceLabs
- Parallel MultiBrowsers executions, e.g. runs X number of scenarios on more than one browsers, all in parallel
- Nemo, a PayPal's open source Selenium Framework
- Grunt Tasks to run Smoke, P1 and/or Acceptance tests
$ brew install chromedriver geckodriver
$ git clone https://github.com/gkushang/nemo-cucumberjs-framework
$ cd nemo-cucumberjs-framework
$ npm i
$ grunt acceptance //will run a default scenario and launch HTML report
Type: String
Default: chrome
$ BROWSER=firefox grunt acceptance
Runs test(s) locally on the firefox browser.
Type: String
Runs tests on saucelabs.com, if account is specified in the config.json. SAUCE
option reads severCaps from the sauce.json file.
$ SAUCE=firefox grunt acceptance
The browser version, platform and other info will be read from config/sauce.json file.
Type: String
Passes the Build ID to the SauceLabs test. SauceLabs uses the BUILD ID to create the test dashboard.
$ BUILD=unique_regression_artifact_id SAUCE=firefox grunt acceptance
Creates a tests Dashboard on SauceLabs with unique $BUILD.
Type: String
Values: ['scenarios', 'features']
$ SAUCE=firefox grunt acceptance --parallel=scenarios
Runs scenarios in parallel. To run features in parallel, pass --paralllel=features
Type: String
Values: any scenario or feature tag
$ grunt acceptance --tags=@anyTestTag
e.g. grunt acceptance --tags=@login
will run scenario(s) tagged with @login
Supports all available Cucumber options, such as --dry-run etc.
Default browser is chrome
, to run on firefox
or any other browser locally
$ BROWSER=firefox grunt acceptance
SauceLabs browsers are available at sauce.json. Pick any one browser combination and pass it as a SAUCE param. BUILD param will create a pretty dashboard on Sauce for your respective test run.
$ SAUCE=iPhone BUILD="`date`" grunt acceptance
BROWSER param is to run tests locally, while SAUCE is to run on SauceLabs
Run any any platform, SAUCE or BROWSER.
e.g. Below command will run your Scenarios in parallel on Chrome browser on SauceLabs.
$ SAUCE=chrome grunt acceptance --parallel=scenarios
$ SAUCE=chrome grunt acceptance --parallel=features
e.g. Run all your scenarios in parallel on Chrome, Firefox and ie10 browsers
$ SAUCE=chrome,firefox,ie10 grunt acceptance --parallel=features
$ grunt acceptance --tags=@yourTag
- Add new features under acceptance/features
- Add step definitions under acceptance/step_definitions
- Add your SauceLabs Username and AccessKey at config.json
- Update/Edit SauceLabs browsers & platform at sauce.json as per your need.
- Copy acceptance folder & _cucumberjs.js & clean.js tasks to your development repo
$ cp -R <path-to-nemo-cucumberjs-framework>/acceptance <path-to-your-repo>/
$ cp -R <path-to-nemo-cucumberjs-framework>/tasks/ <path-to-your-repo>/tasks
-
Merge or copy gruntfile.js
-
Merge package.json
npm i cucumber cucumber-html-reporter cucumber-parallel cucumber-replicate@0.0.2 debug faker fs-finder grunt grunt-cli grunt-config-dir grunt-cucumberjs grunt-force-task lodash nemo@latest nemo-pageobjects nemo-saucelabs nemo-view@latest --save-dev
You are all set!