Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hdorgeval/cucumber-puppeteer-ts-starter
Starter project for e2e tests with cucumber-js and puppeteer-core
https://github.com/hdorgeval/cucumber-puppeteer-ts-starter
automation bdd cucumber cucumber-js e2e gherkin puppeteer puppeteer-core qa starter-template test-framework typescript
Last synced: about 1 month ago
JSON representation
Starter project for e2e tests with cucumber-js and puppeteer-core
- Host: GitHub
- URL: https://github.com/hdorgeval/cucumber-puppeteer-ts-starter
- Owner: hdorgeval
- License: mit
- Created: 2019-11-10T14:35:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-18T20:22:47.000Z (over 2 years ago)
- Last Synced: 2024-10-18T08:38:02.712Z (3 months ago)
- Topics: automation, bdd, cucumber, cucumber-js, e2e, gherkin, puppeteer, puppeteer-core, qa, starter-template, test-framework, typescript
- Language: TypeScript
- Homepage:
- Size: 559 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cucumber-puppeteer-ts-starter
Starter project to write and debug cucumber-js features in TypeScript language for 2E2 tests with puppeteer-core.
## After cloning the repo
* run the command `npm install`.
## To execute the tests locally
* run the command `npm test`.
## To let the browser opened after test execution
* tag the scenario with `@live`
## To debug a scenario in Visual Studio Code
* tag the scenario with `@only` and `@debug`
* set the breakpoints in the typescript code
* Start debugging## To run only specific scenarios
* tag the scenario(s) with `@only`
* run the command `npm run test-only`.## To ignore a scenario
* tag the scenario with `@ignore`
## To check for typescript and linting errors
* run the command `npm run build`.
## To view the html report of the last run
* run the command `npm run report`.
## To use a custom option on the CLI
* add your custom option to the CLI that starts cucumber:
```sh
./node_modules/.bin/cucumber-js features/**/*.feature --foo=bar
```
* use it at runtime:
```js
if (this.cliArgs.foo === 'bar') {
// custom code for option --foo=bar
}
```## To use a custom World Objet
* cutomize the given Custom World Object : [custom-world](world/custom-world.ts)