WDIO test runner unable to find cucumber step definitions
See original GitHub issueWhen executing the WDIO test runner with
$ ./node_modules/.bin/wdio wdio.conf.js
a new Chrome window (as I have configured) pops up briefly and I get:
ERROR: ENOENT: no such file or directory, lstat '/Users/me/path/to/app/features/step_definitions/**'
Meanwhile, I have:
- Installed the Cucumber framework:
wdio-cucumber-framework - Set
wdio.conf.jsfile toframework: 'cucumber' - Am using the default wdio generated cucumberOpts, except for
requirewhere I usedstep_definitionsinstead ofstep-definitions:
cucumberOpts: {
require: ['./features/step_definitions/**/*.js'], // <string[]> (file/dir) require files before executing features
backtrace: false, // <boolean> show full backtrace for errors
compiler: [], // <string[]> ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable)
dryRun: false, // <boolean> invoke formatters without executing steps
failFast: false, // <boolean> abort the run on first failure
format: ['pretty'], // <string[]> (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable)
colors: true, // <boolean> disable colors in formatter output
snippets: true, // <boolean> hide step definition snippets for pending steps
source: true, // <boolean> hide source uris
profile: [], // <string[]> (name) specify the profile to use
strict: false, // <boolean> fail if there are any undefined or pending steps
tags: [], // <string[]> (expression) only execute the features or scenarios with tags matching the expression
timeout: 20000, // <number> timeout for step definitions
ignoreUndefinedDefinitions: false, // <boolean> Enable this config to treat undefined definitions as warnings.
},
If I were to run $ cucumber.js from the command line it would read my file: features/step_definitions/auth/login.js
Yet, the WDIO test runner doesn’t appear to be able to do this, and from the error message, it appears the search path is truncated since I don’t see a /*.js
What can I do here to get cucumber to read my step definitions using the WDIO test runner? Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
CucumberJs cannot find steps using webdriverio5
When I have same path for step definitions defined on main wdio.conf.js file then it works. My main wdio.conf.js file is located in...
Read more >webdriverio/webdriverio - Gitter
Hi guys, I'm starting with webdriverio using cucumber as a framework, but I have a huge need, how can I get the stepsdefinitions...
Read more >FAQ - Cucumber Documentation
If Cucumber is telling you that your steps are undefined, when you have defined step definitions, this means that Cucumber cannot find your...
Read more >Was unable to find a step for “”: Mapping stepDefinitions to ...
While working with cucumber, when steps are not mapped completely with the feature files, it usually gives this as a warning.
Read more >What are Cucumber Hooks And How to Use ... - Tools QA
Test Hooks with Single Scenario · An important thing to note about the after hook is that even in case of test fail,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ahh, I see. ok I think this issue still exists in
wdio-cucumber-framework. I will definitely look at it!@cheungkayip with support of cucumber v2 you now need to apply the actual file instead of the folder.