question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What happened to the "cucumberOpts" parameter? Is that no longer supported?

See original GitHub issue

Hi 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:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wswebcreationcommented, Jun 6, 2017

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

0reactions
edgarechmcommented, Jun 6, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

What happened to the "cucumberOpts" parameter? Is that no ...
Your document says now it should be like this, but doesn't work, returns same error message I submitted with the "ticket". ... I...
Read more >
Cucumber Reference - Cucumber Documentation
Cucumber can be used to implement automated tests based on scenarios described in your Gherkin feature files. Step Arguments. In the example given...
Read more >
webdriver io - How do i run 'tagged' scenarios with Cucumber ...
To run only the tests with specific tag(s) use the --cucumberOpts.tagExpression= parameter like: wdio -- --cucumberOpts.
Read more >
cucumber/cucumber-js - Gitter
I'm having an issue where the summary report is taking too long to generate is there a ... Why do not the Skipped...
Read more >
Configuration File - WebdriverIO
Here is an example configuration with all supported properties and additional ... If your `url` parameter starts without a scheme or `/` (like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found