Unable to run ".feature" file using badeball cucumber preprocessor #1257
Replies: 5 comments 9 replies
-
Well, you can't really comment out that line and expect this to work, as it is pretty crucial. |
Beta Was this translation helpful? Give feedback.
-
That's usually a big clue. I recommend that you take a look at any of the many examples, all of which work. |
Beta Was this translation helpful? Give feedback.
-
if all the config is in place then were is this not defined when I initially checked your examples/config folder for js as I use JavaScript to develop my tests, so I made sure that my package.json dependancies are same as yours, and of course I first tried using your cypress.config.js config structure and again still didn't work. Sorry so when you said, "That's usually a big clue." so what is the clue where is that not defined I'm just learning this and followed everything what you have in your repository I would really appreciate your help as I'm struggling with this a bit not IF I'm honest mate. Cheers |
Beta Was this translation helpful? Give feedback.
-
Saying this doesn't help me to help you. You need to clearly outline to me, the error you're experiencing. Furthermore, if you want my help, you also need to accurately communicate what it is that you're trying to run, IE. what does your project contain. Referring to a link is not accurate. Seeing as the examples work and your project doesn't, I don't trust that you're doing exactly the same as the example you're referring to. I also don't understand your strategy here. Why don't you just use any of the working examples as a foundation and build on it? |
Beta Was this translation helpful? Give feedback.
-
Hi, I did try using this example from your repository: Same folder structure, same file path, config everything, yes the preprocessor is installed then I get and error like this when I try to run it: Your configFile is invalid: /Users/gheorgheberes/Desktop/Cucumber Framework/cypress.config.js It threw an error when required, check the stack trace below: cypress.config.js:2:20
Error: Cannot find module '@cypress/browserify-preprocessor' it is only one installation command mentioned under Installation but nothing about browserify, can you adivise please? |
Beta Was this translation helpful? Give feedback.
-
Hi All,
Please can someone help with this cucumber preprocessor it does not seem to work for me in my Cypress test framework whatever I'm trying, when I have the @browserify configuration then I get one error straight after I run npx cypress open, then when I comment this out in my cypress.config.js file Cypress test runner window opens and I cam see the feature file, but when I try to run this I get an error like this asking for a loader, see error bellow:
**Error: Webpack Compilation Error
Module parse failed: Unexpected token (1:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
cypress.config.js structure:
package.json file structure:
{
"name": "test_auto_practice",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": false,
"stepDefinitions": "cypress/e2e/BDD/ecommerce/*.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@cucumber/cucumber": "^11.0.1",
"cypress": "^13.15.2"
},
"dependencies": {
"@badeball/cypress-cucumber-preprocessor": "^15.1.5",
"@cypress/browserify-preprocessor": "latest",
"cypress-iframe": "^1.0.1"
}
}
Beta Was this translation helpful? Give feedback.
All reactions