What happened to the "cucumberOpts" parameter? Is that no longer supported?
See original GitHub issueHi there! I have the following configuration file:
var featsLocation = 'features/';
var stepsLocation = 'steps/';
exports.config = {
rootElement: 'html',
params:{
authURL:'https://www.mytesturl.com',
login:{
email:'',
passw:''
}
},
resultJsonOutputFile:'',
getPageTimeout: 600000,
allScriptsTimeout: 5000000,
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
capabilities: {
'browserName': 'phantomjs',
'phantomjs.binary.path': '/srv/build/applications/phantomjs/bin/phantomjs.exe'
},
onPrepare: function(){
browser.waitForAngularEnabled(false);
browser.driver.get(browser.params.authURL);
browser.driver.manage().timeouts().pageLoadTimeout(1000000);
browser.driver.manage().window().setSize(1680,1050);
browser.driver.findElement(by.id('Main_txtUserName')).sendKeys(browser.params.login.email);
browser.driver.findElement(by.id('Main_txtPassword')).sendKeys(browser.params.login.passw);
browser.driver.findElement(by.id('Main_btnSubmit')).click();
browser.driver.manage().timeouts().pageLoadTimeout(1000000);
browser.driver.findElement(by.id('Main_lnkCancel')).click();
browser.waitForAngularEnabled(true);
browser.waitForAngular();
browser.driver.wait(function() {
return browser.driver.getTitle().then(function(title) {
return title === 'Final Mile - CSM';
});
}, 4000);
},
specs: [
featsLocation+'ediRejects.feature'
, featsLocation+'ediRejects_sprint.feature'
],
baseUrl: '',
cucumberOpts: {
tags: '',
require: [
'./support/*.js'
, stepsLocation+'ediRejects/ediRejects.spec.js'
],
monochrome: true,
strict: true,
plugin: "json"
},
};
I ran my test using the following prompt command:
protractor ./FM_IntTest_UI_conf.js --disableChecks --params.login.email=some@email.com --params.login.passw=somepassword --cucumberOpts.tags @smoke,@rt
Bug report
It used to work without problem 3 weeks ago. But after an update on our systems, my tests are no longer picked by protractor.
And I have the following message (where I no longer see the cucumberOpts parameter): node “C:\workspace\TFM\trunk\src\test\resources\integration\fm\node_modules.bin\…\protractor\bin\protractor” ./FM_IntTest_UI_conf.js --disableChecks --params.login.email=some@email.com --params.login.passw=somepassword –cucumberOpts.tags @smoke,@rt Usage: protractor [configFile] [options] configFile defaults to protractor.conf.js The [options] object will override values from the config file. See the reference config for a full list of options.
Options: –help Print Protractor help menu –version Print Protractor version –browser, --capabilities.browserName Browsername, e.g. chrome or firefox –seleniumAddress A running selenium address to use –seleniumSessionId Attaching an existing session id –seleniumServerJar Location of the standalone selenium jar file –seleniumPort Optional port for the selenium standalone server –baseUrl URL to prepend to all relative paths –rootElement Element housing ng-app, if not html or body –specs Comma-separated list of files to test –exclude Comma-separated list of files to exclude –verbose Print full spec names –stackTrace Print stack trace on error –params Param object to be passed to the tests –framework Test framework to use: jasmine, mocha, or custom –resultJsonOutputFile Path to save JSON test result –troubleshoot Turn on troubleshooting output –elementExplorer Interactively test Protractor commands –debuggerServerPort Start a debugger server at specified port instead of repl –disableChecks disable cli checks
Error: Error: more than one config file specified at C:\workspace\TestFinalMile\trunk\src\test\resources\integration\finalmile\node_modules\protractor\built\cli.js:159:15 at C:\workspace\TestFinalMile\trunk\src\test\resources\integration\finalmile\node_modules\optimist\index.js:307:21 at Array.forEach (native) at parseArgs (C:\workspace\TestFinalMile\trunk\src\test\resources\integration\finalmile\node_modules\optimist\index.js:305:16) at Object.Argv.self.parse (C:\workspace\TestFinalMile\trunk\src\test\resources\integration\finalmile\node_modules\optimist\index.js:140:16) at Object.<anonymous> (C:\workspace\TestFinalMile\trunk\src\test\resources\integration\finalmile\node_modules\protractor\built\cli.js:162:21) at Module._compile (module.js:571:32) at Object.Module._extensions…js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12)
## If something changed in the configuration file syntax that no longer is supported, please let me know the new rules.
- Node Version:
7.2.0
- Protractor Version:
5.1.1
- Angular Version: Angular is not the issue here, it’s protractor not recognizing parameters that used to work perfectly a few days ago.
- Browser(s): Scripts worked with either phantomjs and chrome
- Operating System and Version
Microsoft Windows [Version 6.1.7601]
- Your protractor configuration file (it’s the code up there)
Feature Request
- Reasons for adopting new feature: Protractor used to work perfectly with cucumber a few weeks ago, with either browser.
- Is this a breaking change? (How will this affect existing functionality): Scripts are not executed at all now! Why messing up what used to work fine? What’s the point?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I also thought your intention was not to offend, but the lines like
Scripts are not executed at all now! Why messing up what used to work fine? What's the point?
are not helpful 😉.Good luck with finding answers with facts / arguments
Ok, I will close the discussion here and open a new issue in Cucumberjs, since from your comment, it looks to be a Cucumberjs issue and not protractor. I’m just looking for answers with arguments, don’t take it personally. Why not simplify things instead of complicate them? I’m sorry if I offended.
The new issue in cucumberjs git is this: https://github.com/cucumber/cucumber-js/issues/848