Search code examples
cucumbercypresscypress-cucumber-preprocessor

how can I pass the cypress.json file to cypress-tags


I'm using cucumber preprocessor and we do not have a standard folder structure. The cypress.json file is under a e2e folder. With cypress open, it was fine because I could specify the cypress.json file location. However, with cypress-tags run, there seems to be no way to specify the location of the cypress.json file and it just fails with error:

Failed to read cypress.json, using default configuration

Could not find a Cypress configuration file, exiting.

Anyway to support a different folder structure with cucumber?


Solution

  • I also stumbled upon this problem and realized that this does not work actually.

    As a workaround I therefore moved away from the approach of using cypress-tags and instead adjusted the naming of my feature files. This allowed me to avoid the use of cypress-tags and use the normal cypress run command instead specifying config and feature files like:

    cypress run --config-file some-cypress.json --spec **/*.integration.feature