Open sherbhachu opened 8 years ago
any update on this issue?
PRs are welcome 😉
I know PR's are welcome but... does anyone know if there is any update with this issue?? 😉
@dcypherthis @wvankuipers do you guys have an idea on how to apply profiles in cucumber?
@christian-bromann No I have not, but I now use multiple wdio.*.js
config files the same way. What could be the use case for supporting profiles?
My scenario is that I would like to pass in username & password dynamically, from the command prompt. Then run the tests in Jenkins, using different baseURLs and username/password combinations. And I dont like to commit passwords to source control.
@batje just pass in username and password as environment variables and use them in your test script
I am currently using cucumber profiles via cucumber cli and, as reported here, cucumberOpts.profile
does not have any effect.
From quickly looking at the code we are passing options to Cucumber.runtime
but I believe cucumber only loads the profile when using the cli and then passes the parsed options to the runtime.
I guess the underlying functions could be reused to support profiles here, but I doubt it is worth the effort. As noted by @wvankuipers, using different wdio.*.js
does work and covers the same use case with even better DX (for a cucumber profile is just a string of command line arguments).
My suggestion would be to update the default config and README
to avoid confusion. If that is ok with @christian-bromann I am happy to help.
If that is ok with @christian-bromann I am happy to help.
Sure, happy to review the PR
We just updated to latest cucumber-js version, can someone check if this issues is fixed by that?
Currently, we can pass in things like tags, and supposedly profiles at runtime, but I have been unable to get profiles working.
so you can do this... wdio wdio.conf.js --cucumberOpts.tags some_tags
but the following fails to do anything... wdio wdio.conf.js --cucumberOpts.profile something
I have a seperate file that contains my profiles...
I require this in my wdio.conf.js file var profiles = require("./features/support/cucumber.js");
Even setting the cucumberOpts in config file explicitly fails to have any affect... cucumberOpts: { .. profile: [profiles.something] .. }