meteorcucumbercucumberjsmeteor-velocity

Chimpjs and Meteor: method calls in tests without using Velocity


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?


Solution

  • 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