Balrog994 / cucumber-test-runner

An Extension for Visual Studio Code to Run and Debug CucumberJS Tests
MIT License
5 stars 8 forks source link

Unable to launch tests from test explorer #18

Open sarut0bi opened 7 months ago

sarut0bi commented 7 months ago

I am currently using cucumber with JavaScript language and following boilerplate : https://github.com/PrinceSoni83/playwright-cucumber-js-e2e-boilerplate

When I run tests from the terminal manually → test ran smoothly When I try to run tests from test explorer or from feature file directly → I get following output

image

I try various changes in settings.json but output is still quiet ...

hardymj commented 6 months ago

@sarut0bi I don't know if its my version of cucumber but the https://github.com/PrinceSoni83/playwright-cucumber-js-e2e-boilerplate/blob/main/package.json has a cucumber package of 7.0.0

"@cucumber/cucumber": "^7.0.0",

I changed this to a newer version

"@cucumber/cucumber": "^9.5.1",

And it still failed but the test ran and went red

image

hardymj commented 6 months ago

I don't know why but....

If you move your config/ assertions / hooks and step definitions into the features folder and change your cucumber.js file to reference that, it will progress the test

Here is an example of the cucumber.js file i used

const common = --require features/config/config.js --require features/setup/assertions.js --require features/setup/hooks.js --require features/step-definitions/**/*.steps.js ;

module.exports = { default: { ...common, }, cli: { ...common, paths: ['features/*.feature'], }, };

image