Cucumber-js: [launcher] Error: Error: config.framework (cucumber) is not a valid framework.

Created on 15 Dec 2015  ·  3Comments  ·  Source: cucumber/cucumber-js

I have a project setup with cucumber-js (0.9.2) setup with protractor (3.0.0) using this config:

// protractor configuration file for cucumber
exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    'features/**/*.feature'
  ],
  capabilities: {
    'browserName': 'chrome'
  },

  baseUrl: 'http://192.168.1.187:8000',
  seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
  framework: 'cucumber',
  cucumberOpts: {
    require: 'features/',
    format: "pretty"
  }
};

when I run the cucumber tests I get:

> protractor config.js

Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
[launcher] Error: Error: config.framework (cucumber) is not a valid framework.
...

when I run protrator with jasmine e2e tests then it works(tm) for that reason I post the issue here and not in protractor pardon me if I wrong.

Most helpful comment

Ok I finally realized that cucumber was removed from protractor. Running cucumber.js standalone worked smoothly:

./node_modules/.bin/cucumber.js features/homepage.feature 

Cucumber has to be set in the protractor (3.0.0) configuration as a custom framework ~ https://github.com/angular/protractor/blob/master/docs/frameworks.md#using-cucumber:

...
framework: 'custom',
frameworkPath: 'node_modules/protractor-cucumber-framework',
...

So it has nothing to do with cucumber-js. Sorry for the noise.

All 3 comments

Ok I finally realized that cucumber was removed from protractor. Running cucumber.js standalone worked smoothly:

./node_modules/.bin/cucumber.js features/homepage.feature 

Cucumber has to be set in the protractor (3.0.0) configuration as a custom framework ~ https://github.com/angular/protractor/blob/master/docs/frameworks.md#using-cucumber:

...
framework: 'custom',
frameworkPath: 'node_modules/protractor-cucumber-framework',
...

So it has nothing to do with cucumber-js. Sorry for the noise.

Sorry for the noise

@pellekrogholt Thanks for explaining the issue. Google got me here, you saved me a lot of time.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings