Cly*_*own 7 cucumber protractor
我找到了一些描述设置步骤的帖子,但是当我按照它们操作时,我收到一个错误:找不到模块“黄瓜”。我全局安装了黄瓜和量角器以及量角器-黄瓜,并且可以单独执行它们,但在尝试使用黄瓜框架执行量角器时则不能。
我使用的配置文件如下:
var env = require('./environment.js');
// A small suite to make sure the cucumber framework works.
exports.config = {
seleniumAddress: env.seleniumAddress,
framework: 'cucumber',
// Spec patterns are relative to this directory.
specs: [
'../app/modules/auth/html/cucumber/*.feature'
],
capabilities: env.capabilities,
baseUrl: env.baseUrl,
cucumberOpts: {
require: '../app/modules/auth/html/cucumber/stepDefinitions.js',
tags: '@dev',
format: 'summary'
}
};
Run Code Online (Sandbox Code Playgroud)
有什么建议我可以尝试解决该问题吗?
stacktrace:使用位于http://localhost:4444/wd/hub [启动器]的selenium服务器 运行1个WebDriver实例[启动器]错误:错误:无法在Function.Module._resolveFilename(module.js: 338:15) 在 Function.Module._load (module.js:280:25) 在 Module.require (module.js:364:17) 在 require (module.js:380:17) 在 Object.exports.run ( /Users/lbrown/node_modules/protractor/lib/frameworks/cucumber.js:13:18) 在 /Users/lbrown/node_modules/protractor/lib/runner.js:293:35 在 _fulfilled (/Users/lbrown/node_modules/量角器/node_modules/q/q.js:797:54) 在 self.promiseDispatch.done (/Users/lbrown/node_modules/protractor/node_modules/q/q.js:826:30) 在 Promise.promise.promiseDispatch (/ Users/lbrown/node_modules/protractor/node_modules/q/q.js:759:13) at /Users/lbrown/node_modules/protractor/node_modules/q/q.js:573:44 [launcher] 进程退出,错误代码 100
黄瓜仍然可能没有全局安装。
在命令行上尝试一下:
node
> require('cucumber')
Run Code Online (Sandbox Code Playgroud)
如果抱怨找不到 Cucumber,那么您没有全局安装 Cucumber。否则,您可以粘贴堆栈跟踪吗?
| 归档时间: |
|
| 查看次数: |
21261 次 |
| 最近记录: |