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

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

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 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