Cucumber-js: [启动器] 错误:错误:config.framework (cucumber) 不是有效的框架。

创建于 2015-12-15  ·  3评论  ·  资料来源: cucumber/cucumber-js

我使用以下配置使用带有量角器(3.0.0)的黄瓜-js(0.9.2)设置项目设置:

// 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"
  }
};

当我运行黄瓜测试时,我得到:

> 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.
...

当我使用 jasmine e2e 测试运行量角器时,它可以工作(tm),因此我在这里发布问题,而不是在量角器中,如果我错了,请原谅我。

最有用的评论

好吧,我终于意识到黄瓜从量角器上取下来了。 独立运行黄瓜.js 工作顺利:

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

Cucumber 必须在量角器 (3.0.0) 配置中设置为自定义框架 ~ https://github.com/angular/protractor/blob/master/docs/frameworks.md#using -cucumber:

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

所以它与cucumber-js无关。 对不起,噪音。

所有3条评论

好吧,我终于意识到黄瓜从量角器上取下来了。 独立运行黄瓜.js 工作顺利:

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

Cucumber 必须在量角器 (3.0.0) 配置中设置为自定义框架 ~ https://github.com/angular/protractor/blob/master/docs/frameworks.md#using -cucumber:

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

所以它与cucumber-js无关。 对不起,噪音。

抱歉噪音

@pelekrogholt感谢您解释这个问题。 谷歌让我来到这里,你为我节省了很多时间。

由于关闭后没有任何近期活动,因此该线程已自动锁定。 请为相关错误打开一个新问题。

此页面是否有帮助?
0 / 5 - 0 等级