Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
Changing folder structure in cypress cucumber

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"
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!