我一直在阅读量角器,它看起来是在我团队的 AngularJS 系统上进行自动化功能测试的好方法。我按照此处的设置步骤进行操作,因此我可以继续使用 gherkin 来定义功能文件(如普通黄瓜中的文件),但是当我$ cucumber.js
在自述文件上运行 step 时,我不断收到以下错误。
/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/assembler.js:105
self.getCurrentFeature().convertScenarioOutlinesToScenarios();
^
TypeError: Cannot call method 'convertScenarioOutlinesToScenarios' of undefined
at Object.finish (/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/assembler.js:105:32)
at Object.handleEof [as eof] (/usr/local/lib/node_modules/cucumber/lib/cucumber/parser.js:70:20)
at Lexer.scan (/usr/local/lib/node_modules/cucumber/node_modules/gherkin/lib/gherkin/lexer/en.js:1049:21)
at Object.parse (/usr/local/lib/node_modules/cucumber/lib/cucumber/parser.js:26:25)
at Object.getFeatures (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime.js:30:35)
at Object.start (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime.js:16:37)
at Object.runSuiteWithConfiguration (/usr/local/lib/node_modules/cucumber/lib/cucumber/cli.js:19:15)
at Object.run (/usr/local/lib/node_modules/cucumber/lib/cucumber/cli.js:12:14)
at Object.<anonymous> (/usr/local/lib/node_modules/cucumber/bin/cucumber.js:4:5)
at Module._compile (module.js:456:26)
到目前为止,所有设置步骤都运行良好。我在这里想念什么?