Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

397
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda