All Projects → protractor-cucumber-framework → Protractor Cucumber Framework

protractor-cucumber-framework / Protractor Cucumber Framework

Licence: mit
Cucumber framework plugin for Protractor

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Protractor Cucumber Framework

Kakunin
An E2E testing framework
Stars: ✭ 141 (-26.18%)
Mutual labels:  cucumber, protractor
CodeSpecJS
UI Automation Testing without writing a single line of code
Stars: ✭ 16 (-91.62%)
Mutual labels:  protractor, cucumber
Cucumber Protractor Harness
Simple starter project for incorporating cucumber (2.3.1) with protractor
Stars: ✭ 9 (-95.29%)
Mutual labels:  cucumber, protractor
Cabbage
Story BDD tool for executing elixir in ExUnit
Stars: ✭ 102 (-46.6%)
Mutual labels:  cucumber
Protractor Net
The .NET port of Protractor, an E2E test framework for Angular apps
Stars: ✭ 113 (-40.84%)
Mutual labels:  protractor
Seleniumwithcucucumber
In this project we will discuss working Selenium with cucumber
Stars: ✭ 104 (-45.55%)
Mutual labels:  cucumber
Cluecumber Report Plugin
Maven plugin for clear and concise Cucumber BDD test reporting.
Stars: ✭ 173 (-9.42%)
Mutual labels:  cucumber
Cukes
Cucumber DSL for testing RESTful Web Services
Stars: ✭ 95 (-50.26%)
Mutual labels:  cucumber
Cucumber Reports Plugin
Jenkins plugin to generate cucumber-jvm reports
Stars: ✭ 168 (-12.04%)
Mutual labels:  cucumber
Cleanguitestarchitecture
Sample project of Android GUI test automation using Espresso, Cucumber and the Page Object Pattern
Stars: ✭ 139 (-27.23%)
Mutual labels:  cucumber
Websiteone
A website for Agile Ventures
Stars: ✭ 132 (-30.89%)
Mutual labels:  cucumber
Query Selector Shadow Dom
querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components. Production use is not advised, this is for test environments/tools such as Web Driver, Playwright, Puppeteer
Stars: ✭ 115 (-39.79%)
Mutual labels:  protractor
Generator Jhipster Ionic
Ionic for JHipster 💥
Stars: ✭ 147 (-23.04%)
Mutual labels:  protractor
Uyuni
Source code for Uyuni
Stars: ✭ 169 (-11.52%)
Mutual labels:  cucumber
Gunit
GUnit - Google.Test/Google.Mock/Cucumber on steroids
Stars: ✭ 156 (-18.32%)
Mutual labels:  cucumber
Spreewald
Our collection of useful cucumber steps.
Stars: ✭ 131 (-31.41%)
Mutual labels:  cucumber
Protractor Perf
E2E test framework to check for performance regressions in Angular apps
Stars: ✭ 95 (-50.26%)
Mutual labels:  protractor
Base App
An app to help jumpstart a new Rails 4 app. Features Ruby 2.0, PostgreSQL, jQuery, RSpec, Cucumber, user and admin system built with Devise, Facebook login.
Stars: ✭ 127 (-33.51%)
Mutual labels:  cucumber
Java Ddd Skeleton
♨️ DDD in Java skeleton & examples. Course:
Stars: ✭ 140 (-26.7%)
Mutual labels:  cucumber
Howitzer
Ruby-based framework for acceptance testing
Stars: ✭ 179 (-6.28%)
Mutual labels:  cucumber

Protractor Cucumber Framework

npm-version Join the chat at https://gitter.im/protractor-cucumber-framework/protractor-cucumber-framework Build Status dependencies dev dependencies peer dependencies download-count open-issues contributors

This framework was originally part of angular/protractor and is now a separate module to decouple cucumber.js.

Install

npm install --save-dev protractor-cucumber-framework

Implementation

To implement this framework, utilize the protractor custom framework config option:

exports.config = {
  // set to "custom" instead of cucumber.
  framework: 'custom',

  // path relative to the current config file
  frameworkPath: require.resolve('protractor-cucumber-framework'),

  // require feature files
  specs: [
    'path/to/feature/files/**/*.feature' // accepts a glob
  ],

  cucumberOpts: {
    // require step definitions
    require: [
      'path/to/step/definitions/**/*.steps.js' // accepts a glob
    ]
  }
};

Passing Options to cucumberjs

All of the cucumberOpts will be passed to cucumberjs as arguments.

For example, to call cucumberjs with the --strict, --no-colors, and to specify custom formatters:

cucumberOpts: {
  strict: true,
  'no-colors': true,
  format: ['progress', 'pretty:output.txt'],
  // ...
}

The following parameters have special behavior:

  • require - globs will be expanded to multiple --require arguments
  • rerun - value is passed as an argument; for use with the rerun feature

Formatters when tests are sharded or with multi capabilities

If you have a formatter that outputs to a path and your tests are sharded or you have multi capabilities then this library will add the PID to the path to make them unique. The reason for this is multiple processes can write to the same path which ends up clobbering each other. You'll end up with 1 file per process that protractor spawns.

exports.config = {
  capabilities: {
    shardTestFiles: true,
    // ...
  },

  cucumberOpts: {
    format: 'json:results.json',
    // ...
  }
};

If there were 2 feature files then you can expect the following output files...

  results.11111.json
  results.22222.json

...where the numbers will be the actual PIDs.

Uncaught Exceptions

If your process abruptly stops with an exit code 199 then your steps most likely threw an uncaught exception. Protractor is capturing these and exiting the process in this situation. The solution is to upgrade to at least protractor version 4.0.10 and add the following to your protractor conf...

  ignoreUncaughtExceptions: true

This allows cucumber to handle the exception and record it appropriately.

Contributing

Pull requests are welcome. Commits should have an appropriate message and be squashed.

For Contributors

Ensure that the following dependencies are installed:

  • Java SDK and JRE
  • node.js
  • Google Chrome

Clone the github repository:

git clone https://github.com/protractor-cucumber-framework/protractor-cucumber-framework
cd protractor-cucumber-framework
npm install

Testing

Start a selenium server:

npm run webdriver

Start the test app that tests will be run against in a separate shell:

npm start

Run the tests in a separate shell:

npm test

For Maintainers

Releasing

  1. bump version
  2. npm publish
  3. tag release (git tag vx.x.x && git push origin master --tags)
  4. build github release (npx release)
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].