cucumber_reporter_sync
is an npm library designed to merge multiple Cucumber JSON reports and optionally post the results to a Slack channel. It helps streamline the process of aggregating Cucumber test results and sharing them in a team communication platform like Slack.
To install the cucumber_reporter_sync
package, run the following command:
npm install cucumber_reporter_sync --save-dev
You can also configure the library to post the merged report to a Slack channel. To do this, add the –slack
npx cucumber_reporter_sync merge --recursive --dir reports --slack https://hooks.slack.com/{YOUR WEBHOOK URL}
–recursive (optional) Recursively search for report files in subdirectories.
–dir
-o
–slack
npx cucumber_reporter_sync merge --dir ./reports -o ./reports/merged-report.json --slack https://hooks.slack.com/services/XXX/YYY/ZZZ
In order to change the username and environment, you can use set the following environment variables:
export TEST_USERNAME={YOUR USERNAME}
export TEST_USERNAME=siddharth23
export TEST_ENV={YOUR ENVIRONMENT}
export TEST_ENV=staging
The merged Cucumber report will be posted to Slack with key information, such as: Total number of tests Passed and failed tests scenarios side by side view
This project is currently maintained by:
Feel free to contribute if you’d like to help improve this project!