Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alincode/cucumberjs-sandbox
https://github.com/alincode/cucumberjs-sandbox
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alincode/cucumberjs-sandbox
- Owner: alincode
- Created: 2016-09-17T13:33:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-24T23:35:53.000Z (over 7 years ago)
- Last Synced: 2024-11-06T07:27:18.784Z (about 2 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cucumberjs-sandbox
## First cucumber feature
### step by step
**init project**
```
npm init -y
npm i cucumberjs chai -S
```**create features folder**
`mkdir features`
**create first feature**
`vi features/bmi.feature`
**execute**
`cucumberjs`
or
`npm test`
**create first feature step**
`vi features/bmiStep.js`
## generate html report
### step by step
**install cucumber-html-report module**
`npm i cucumber-html-reporter -D`
**setting up cucumber-html-report config**
`vi reporter.js`
**generate json report file**
`cucumberjs -f json:cucumber_report.json`
or
`npm run report:createJson`
**convert json to html report**
`node reporter`
or
`npm run report:createHtml`
**quickly start**
`npm run report`
### reference
* [cucumber-html-report](https://www.npmjs.com/package/cucumber-html-report)
## coverage
**install istanbul module**
`npm i istanbul -D`
**execute**
`istanbul cover cucumberjs`
or
`npm run coverage`