cypress-cucumber-boilerplate-for-e2e-testing
Cypress 10+ with Cucumber boilerplate project.
💻
Topics
Integrated with:
- https://github.com/badeball/cypress-cucumber-preprocessor
- https://github.com/bahmutov/cypress-esbuild-preprocessor
- https://www.npmjs.com/package/multiple-cucumber-html-reporter
- https://github.com/cucumber/json-formatter
(+ bundlers: https://github.com/badeball/cypress-cucumber-preprocessor/tree/master/examples)
-
💻 Pre-requisites
Before you use this project you only need to have Node Js installed in your computer.
https://nodejs.org/es/download/
Also, download and install the JSON fomatter depending on your OS
https://github.com/cucumber/json-formatter
🚀
Install the project
Install project dependencies with: npm i
🚀
Run the demo:
Open the terminal and run: npm run cypress:execution
Getting spawn error
npm run cypress:execution
Getting errorError: spawn Unknown system error -86 at ChildProcess.spawn (node:internal/child_process:413:11) at Object.spawn (node:child_process:743:9) at afterRunHandler (/Users/jlair3/cypress-cucumber-api/node_modules/@badeball/cypress-cucumber-preprocessor/lib/add-cucumber-preprocessor-plugin.js:88:55)
I am using node 18. I didn't make any change yet but straightnpm i
and thennpm run cypress:execution
Run example with multiple tags
Hello @JoanEsquivel !
Thank you for providing this nice boilerplate! Is there any option to run by using the same command multiple tags? (let's say @mobile and @desktop)
I've had a look over the package.json but couldn't find any example, but only with one tag: "cypress:execution-tags": "cypress run --env [email protected]",
Thanks
Error after mp4 created
I installed all prerequisites. Verified the standalone formatter was working properly. I get this error after the run:
(Video)
An error was thrown in your plugins file while executing the handler for the after:run event.
The error we received was:
Error: spawn cucumber-json-formatter.exe ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19) at onErrorNT (internal/child_process.js:467:16) at processTicksAndRejections (internal/process/task_queues.js:82:21) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] cypress:execution:
cypress run
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] cypress:execution script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /Users/chunter/.npm/_logs/2022-09-10T00_04_57_720Z-debug.log
Repo changes
Changes
Yaml / read data in our tests
Hi, JoanEsquivel , how to read yaml data in cypress cucumber framework, I need to read value of yml by node and key in my tests please help me to find solution it will be very much help full @JoanEsquivel ☺