3

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?

Victor Deplasse
  • 682
  • 6
  • 10
  • See Xolvio's [answer and dialogue under that](http://stackoverflow.com/questions/33760737/how-do-you-return-from-a-meteor-methods-stub-in-cucumber/33767848?noredirect=1#comment55316722_33767848). He specifically says to put the fixtures in `/fixtures` – Michel Floyd Nov 19 '15 at 23:12
  • My files are in tests/cucumber/fixtures. Isn't that alright? – Victor Deplasse Nov 19 '15 at 23:32
  • Seems he meant at the root level. The other approach is to put the methods in a debug only package which is what I've done. – Michel Floyd Nov 19 '15 at 23:35

1 Answers1

3

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

Xolv.io
  • 2,483
  • 1
  • 15
  • 17
  • I still seem to be having issues using this package pattern wrapper if you have any suggestions (detailed here: http://stackoverflow.com/questions/35303443/meteor-js-using-server-call-when-testing-with-chimp) – Kyle Bachan Feb 10 '16 at 15:13