cucumber / cucumber-js

Cucumber for JavaScript
https://cucumber.io
MIT License
5.01k stars 1.09k forks source link

Question - How to provide multiple feature file path in cucumber.js file #2385

Closed mrsenzy closed 3 months ago

mrsenzy commented 3 months ago

Hi -

I am using cucumber.js to provide configuration, like below. I would like to know how can i provide multiple feature file path, so the feature file can be executed in order.

in documentation i see if its cucumber.json then it can be provided as path: [ feature1, feature2 ] and if i provide that way in common it is not able to recognize the path

let common = [ 'e2e/features/*/.features', '--require-module ts-node/register', '--require ./e2e/stepDefinitions/*/.ts', '--require ./cucumber.config.ts', '--format @cucumber/pretty-formatter' ... ].join(' ')

module.export = {

}

davidjgoss commented 3 months ago

If you are doing the CLI-style configuration, you just space-separate multiple feature paths or globs:

let common = [
  'e2e/features/feature1.feature',
  'e2e/features/feature2.feature',
  ...
].join(' ')