-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test runner says steps are undefined when official Cubumer extension can navigate between steps and features. #1
Comments
Hi, I'll look into it in the weekend 👍 |
Your main issue is due to a missing feature of this extension. The extensions launches tests with the To solve this problem you have to change your module.exports = {
- test_runner: run_features
+ default: run_features,
}; This however brings up a new problem that's actually mentioned in the following issue cucumber/cucumber-js#2253 on the cucumber-js repository. I think I have a workaround until const dotenv = require("dotenv");
dotenv.config({ override: false });
let options = [
'--require-module ts-node/register',
'--require ./srs-vp/System-Requirement-Specifications/Functional-Requirements/steps/*steps.ts',
'--format progress',
].join(" ");
- let run_features = ['./srs-vp/System-Requirement-Specifications/Functional-Requirements/features/*.feature', options].join(" ");
+ //let run_features = ['./srs-vp/System-Requirement-Specifications/Functional-Requirements/features/*.feature', options].join(" ");
module.exports = {
- default: run_features,
+ default: options,
}; This allows the extension to launch the tests correctly. Hope this helps 😉 |
Thanks for the response. I made changes (below) to cucumber-js but am still seeing the same behavior. When I run using cucumber-js script cucumber is able to link the feature file with step file and run the tests but cucumber-test-runner reports that the steps are undefined. cucumber-js: const dotenv = require('dotenv'); dotenv.config({ override: false }); let options = [ module.exports = { |
Hi, I guess your problem is the following line: './srs-vp/System-Requirement-Specifications/Functional-Requirements/features/*.feature', If you keep that line in the configuration, the extension will not work properly due to the problem mentioned before. If you need both the configurations, you can try to define 2 profiles, the |
Hello again. I took your suggestion and created multiple profiles but the behavior is the exact same:
|
Seems like I can't reproduce your problem, just for debug purposes that's what the extension executes to run tests: node ./node_modules/@cucumber/cucumber/bin/cucumber.js <full-path-to-feature-file>:<line-of-the-selected-test> [...<full-path-to-feature-file>:<line-of-the-selected-test>] --format message The command is executed from the working folder open in VSCode. I tried your new configuration in my test project and, aside from manually creating the I would be great if you could publish a minimal project that exposes this behavior 😉 |
Hello. When trying this extension and running/debugging scenarios the test running says "Undefined. Implement with the following snippet". But when I run using cucumber-js script cucumber is able to link the feature file with step file and run the tests. Here is my cucumber.js file:
const dotenv = require('dotenv');
dotenv.config({override: false});
let options = [
'--require-module ts-node/register',
'--require ./srs-vp/System-Requirement-Specifications/Functional-Requirements/steps/*steps.ts',
'--format progress',
].join(' ');
let run_features = [
'./srs-vp/System-Requirement-Specifications/Functional-Requirements/features/*.feature',
options,
].join(' ');
module.exports = {
test_runner: run_features
};
Here is my settings.json:
{
"cucumberautocomplete.strictGherkinCompletion": true,
"cucumberautocomplete.steps": [
"./doc/srs-vp/System-Requirement-Specifications/Functional-Requirements/steps/.ts"
],
"cucumberautocomplete.syncfeatures": "./doc/srs-vp/System-Requirement-Specifications/Functional-Requirements/features/.feature",
}
The text was updated successfully, but these errors were encountered: