Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epszaw/allure-cucumberjs-demo
https://github.com/epszaw/allure-cucumberjs-demo
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/epszaw/allure-cucumberjs-demo
- Owner: epszaw
- License: mit
- Created: 2022-06-24T16:05:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T09:28:47.000Z (over 1 year ago)
- Last Synced: 2024-04-14T07:36:28.578Z (7 months ago)
- Language: JavaScript
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Allure CucumberJS integration
This example demonstrates how works `allure-cucumberjs` integration.
## Installation
1. Create a `cucumberjs` reporter using `allure-js-common` and `allure-cucumberjs` packages:
```js
const { AllureRuntime } = require('allure-js-commons')
const { CucumberJSAllureFormatter } = require('allure-cucumberjs')module.exports = class extends CucumberJSAllureFormatter {
constructor(options) {
super(
options,
new AllureRuntime({ resultsDir: "./allure-results" }),
{},
);
}
}
```
2. Add `test` script to the root `package.json` file:
```diff
{
"name": "allure-js-cucumber-demo",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
+ "scripts": {
+ "test": "cucumber-js -f ./reporter.js"
+ },
"devDependencies": {
"@cucumber/cucumber": "^8.3.1",
"allure-cucumberjs": "^2.0.0-beta.18",
"allure-js-commons": "^2.0.0-beta.18",
"chai": "^4.3.6"
}
}```
3. Write some features and steps-defs
4. Then run the `test` script## Run the demo
1. Clone the repository
2. Install dependencies:
```shell
npm i # for npm users
yarn # for yarn users
```
3. Run the tests script:
```shell
npm t # for npm users
yarn test # for yarn users
```
4. Check the result in `allure-results` directory
5. Upload your results right to the `Launches`