meteor - 黑猩猩和 meteor : method calls in tests without using Velocity

标签 meteor cucumber cucumberjs meteor-velocity

此应用程序显示了使用 Cucumber 测试 Meteor 的示例: https://github.com/mhurwi/cucumber-meteor-tutorial

它与 Velocity 配合良好。但是,当使用 Velocity 启动应用程序时,我的计算机变得非常慢,并且我不希望它在我开发时始终运行。所以我尝试使用 Chimp 作为 NPM 模块

chimp --ddp=http://localhost:3000

按照此处的建议: https://chimp.readme.io/docs/getting-started-with-meteor-cucumber

但是使用方法调用的测试(方法位于tests/cucumber/fixtures/中)不起作用:

Error: Method not found [404]

有人知道我应该做什么才能使用命令行而不是 Velocity 运行 Cucumber 测试吗?

感谢您的帮助。

另一个小问题:第一次启动时 Velocity 是否需要很长时间(我只进行了一些测试,它几乎卡住了我的计算机)还是每次都一样?

最佳答案

当针对 Meteor 运行 Chimp 时,您不能将固定装置放入 tests/cucumber/fixtures 中,您必须使用固定装置包模式,请参见此处:

https://meteor-testing.readme.io/docs/data-fixtures

然后您可以使用步骤定义中的 server.call('xxx') 调用装置

关于meteor - 黑猩猩和 meteor : method calls in tests without using Velocity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33816027/

相关文章:

Cordova 和 meteor : Both web and Mobile App

java - 代码驱动时如何使用 Cucumber 表

javascript - 在 Protactor 中调试测试时是否可以解析并查看 Promise 的结果?

Protractor 测试已通过但未执行测试

meteor - 单击按钮时多次调用 meteor 中的服务器方法

node.js - 如何从 Meteor 上的 Selenium 错误中恢复?

node.js - Meteor HTTP.call gzip 答案

ruby - 学习 Ruby 作为脚本语言需要多长时间?

ruby - kernel_require.rb :55:in `require' : cannot load such file error

cucumberjs - 使用javascript在 cucumber javascript中自动生成步骤