Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spirosikmd/cucumber-puppeteer-example
Example project on how to use cucumber with puppeteer for UI testing
https://github.com/spirosikmd/cucumber-puppeteer-example
cucumber-js gherkin puppeteer ui-testing
Last synced: 7 days ago
JSON representation
Example project on how to use cucumber with puppeteer for UI testing
- Host: GitHub
- URL: https://github.com/spirosikmd/cucumber-puppeteer-example
- Owner: spirosikmd
- License: mit
- Created: 2018-02-17T17:14:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-29T21:24:39.000Z (over 4 years ago)
- Last Synced: 2024-08-02T15:52:23.768Z (3 months ago)
- Topics: cucumber-js, gherkin, puppeteer, ui-testing
- Language: JavaScript
- Homepage:
- Size: 72.3 KB
- Stars: 37
- Watchers: 2
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cucumber-puppeteer-example
Write UI tests using Gherkin, Cucumber, and Puppeteer. This project is an example project on how to use [cucumber](https://github.com/cucumber/cucumber-js) with [puppeteer](https://github.com/GoogleChrome/puppeteer). It uses the [React TodoMVC](http://todomvc.com/examples/react/#/) project as a test UI.
Run `yarn`/`npm install` to get the dependencies and then run `yarn test`/`npm test` to execute the UI tests.
The test command will generate a JSON report file. You can use the `yarn test:report`/`npm run test:report` command to check the HTML report.
## Headless
The tests run by default in headless mode. To launch a full version of Chromium:
```
$ HEADLESS=false yarn test
```## Timeouts
The `http://todomvc.com/examples/react/#/` might be slow. To avoid any kind of timeout erros, in [world.js](./features/support/world.js) there is an example of how to [change the default timeout](https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/timeouts.md#timeouts).