Chimpjs和Meteor:在没有使用Velocity的测试中的方法调用 [英] Chimpjs and Meteor: method calls in tests without using Velocity

查看:254
本文介绍了Chimpjs和Meteor:在没有使用Velocity的测试中的方法调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此应用程序显示了使用黄瓜测试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 /中)不起作用:

 错误:找不到方法[404] 

应该使用命令行而不是Velocity来运行Cucumber测试?



感谢您的帮助。



另一个小问题:Velocity在第一次启动时需要很多时间(我只有几个测试,几乎冻结了我的电脑),或者每次都是一样的吗?


<当你运行Chimp对流星,你不能把夹具在 tests / cucumber / fixtures ,你有使用fixture包模式,请参阅这里:



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



然后您可以使用 server.call('xxx')来自您的步骤defs


This app shows an example of testing Meteor with Cucumber: https://github.com/mhurwi/cucumber-meteor-tutorial

It works well with Velocity. But my computer becomes very slow when starting an app with Velocity and I don't want it to always run when I'm developing. So I tried to use Chimp as an NPM module by using

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

as proposed here: https://chimp.readme.io/docs/getting-started-with-meteor-cucumber

But the tests with method calls (the methods are in tests/cucumber/fixtures/) don't work:

Error: Method not found [404]

Does anyone have an idea of what I should do in order to run the Cucumber tests using the command line instead of Velocity?

Thank you for your help.

Another small question: does Velocity take a lot of time when it's the first launch (I only have a few tests and it nearly freezes my computer) or is it the same every time?

解决方案

When running Chimp against Meteor, you can't put fixtures in tests/cucumber/fixtures, you have to use the fixture package pattern, see here:

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

Then you can call the fixtures using server.call('xxx') from your step defs

这篇关于Chimpjs和Meteor:在没有使用Velocity的测试中的方法调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆