https://github.com/sri85/protractor-cucumber-demo
Demo for writing E2E tests using protractor and cucumber
https://github.com/sri85/protractor-cucumber-demo
angular boilerplate cucumber e2e-tests nodejs protractor protractor-cucumber selenium selenium-webdriver
Last synced: 2 months ago
JSON representation
Demo for writing E2E tests using protractor and cucumber
- Host: GitHub
- URL: https://github.com/sri85/protractor-cucumber-demo
- Owner: sri85
- License: mit
- Created: 2017-09-05T21:47:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-07T22:56:36.000Z (over 7 years ago)
- Last Synced: 2025-01-28T05:15:45.691Z (4 months ago)
- Topics: angular, boilerplate, cucumber, e2e-tests, nodejs, protractor, protractor-cucumber, selenium, selenium-webdriver
- Language: JavaScript
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
- Support: support/hooks.js
Awesome Lists containing this project
README
## Protractor Cucumber Demo
These selenium tests are written using protractor along with cucumber. Cucumber allows stakeholders like Product Owners, Business analysts to describe test scenarios
in plain English.Framework features:
1. In addition to this , this framework produces
a html report which can be shared with stakeholders and also helps in debugging.
The html reports can be found under htmlReports directory.2. Ability to capture screenshots on failure which are later attached to the report.
3. Sends message to slack on completion of test execution.
## Instructions for running tests
# Pre-requisities
1. [NodeJs](https://nodejs.org/en/download/)
2. [Chrome Browser](https://www.google.com/chrome/browser/desktop/index.html)# Steps
1. Navigate to `moo-e2e` folder
2. Do `npm install`
3. Run `npm run webdriver-update`(This updates all the selenium drivers)
4. Run `npm run webdriver-start`(This starts the selenium server)
5. You can confirm this by visiting this [URL](http://localhost:4444/wd/hub/static/resource/hub.html)
6. Open a new terminal window and run `npm test` which runs all the tests.
7. To shut the selenium server just press `ctrl+c` in terminal window where the selenium server is running.### Easter-Eggs
Alternatively if you don't want to run the tests in a local chrome browser or you do not have chrome installed on your machine you could run the tests in a docker selenium grid. For this to happen , make sure you have [docker](https://www.docker.com/docker-mac) installed on your system.
Now run `docker-compose up -d`, this should spin up a docker selenium grid with one chrome node.
If you are impatient and would like to speed up the test execution increase the chrome nodes by
`docker-compose scale chromenode=2` and then run `npm run paralleltest`### FootNotes:
All the above commands have been tested on OsX, have not really checked that these work on other platforms.(Linux should be fine , Windows not really sure)