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

401
Views
How to access feature files in cucumber using Cypress latest version (10.2.20)

I have been working on Cypress's latest version (10.2.0) with BDD in cucumber. Everything's working fine just my feature files are not accessible. I have tried using SpecPattern as written in the documentation but no help.

The spec pattern line is as follows:

    specPattern: "/cypress/e2e/**/*.feature"

Also, My cucumber is imported and running fine

Cypress.config file:

const { defineConfig } = require("cypress");
const cucumber = require('cypress-cucumber-preprocessor').default

module.exports = defineConfig({
e2e: {
  setupNodeEvents(on, config) {
    on('file:preprocessor',cucumber())
    // implement node event listeners here
  },

Package.Json File:

"devDependencies": {
    "cypress-cucumber-preprocessor": "^4.3.1"
  },
  "cypress-cucumber-preprocessor":{
    "nonGlobalStepDefinitions" : false
  }
}

Image showing there is no feature file in this directory

While my feature file is present in the same directory shown in the above picture

Any help would be appreciated

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You should change your cypress-cucumber library.

This indicates you have an old version

const cucumber = require('cypress-cucumber-preprocessor').default

You should use this version

// package.json

"@badeball/cypress-cucumber-preprocessor": "^11.3.0",
// cypress.config.js

const preprocessor = require("@badeball/cypress-cucumber-preprocessor");

Repo, instructions etc Github

about 4 years ago · Juan Pablo Isaza Report

0

Update your specPattern to "**/*.feature". This will search for .feature files throughout your project and not just a specific folder.

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!