I write some test cases using cypress and cucumber, and the test cases are running successfully if the folder structure is like this:
/integration
/login
login.js
/registration
registration.js
login.feature
registration.feature
But I want to keep all the feature files in one folder and the js files in another folder like this:
/integration
/featureFiles
login.feature
registration.feature
/testFiles
login.js
registration.js
If I make the folder structure like this, I got error. No test case runs. Is it possible to make the structure like this? Can anyone please tell me how to do that?
here is my package.json file:
{
"devDependencies": {
"cypress": "^9.5.4",
"multiple-cucumber-html-reporter": "^1.20.0"
},
"dependencies": {
"cypress-cucumber-preprocessor": "^4.3.1"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true,
"cucumberJson": {
"generate": true,
"outputFolder": "cypress/cucumber-json",
"filePrefix": "",
"fileSuffix": ".cucumber"
}
}
}
and cypress.json file:
{
"testFiles": "**/*.feature"
}
Hi you have wrong folder structure, it shout be like this:
/integration
/common - ( here you write your step definitions )
/features - ( here you write your features )
If you want custom files names read options in cypress-cucumber-preprocessor.