unit-testingmeteorfunctional-testingmeteor-velocitytinytest

How to test Meteor packages since Meteor 1.0?


From what I understand, there are two major packages that help in testing a package - TinyTest, and Velocity, which became the official Meteor testing framework.

From the Meteor's DevShop in June, the Velocity team said that Velocity can run alongside TinyTest, but I do not understand the difference in the features these two packages provides, is one (TinyTest) redundant?

Is TinyTest only meant for unit testing? If I want integration testing, functional testing, would I need to turn to Velocity and its supported frameworks? Or something else completely different? There is a comparison table, but it is a bit dated.


Solution

  • TinyTest is currently the only solution that allows you to test packages, this is one of the reasons why it's still on the map. The other reason is that TinyTest was the official testing solution prior to Velocity and as such it still has a following.

    Unit testing (both server and client) is currently only supported by Jasmine. Integration testing (both server and client) is supported by Jasmine and Mocha-web. End-to-end testing is supported by Xolv.io Cucumber, and also Casper and Nightwatch. You can also add Xolv.io webdriver to mocha/jasmine and in fact you can even add webdriver to TinyTest if you want!

    You may find this blog post I wrote useful, it talks about the different testing modes of Meteor and also has a comparison table at the bottom.

    You might also find this chapter I wrote on Velocity useful.