I’ve just starting testing a fairly complex Meteor package I’ve been writing and have found the process to be well worthwhile. Even though I only had a very limited set of tests written, they caught a bunch of errors that I wouldn’t otherwise have spotted during a recent refactor. I’m using
sanjo:jasmine with the velocity html reporter.
I’ve also dabbled with
xolvio:cucumber and, although I don’t have much of a clue about how to get the best out of it, I can see that it will be pretty awesome for BDD. This tutorial is fantastic. I’d really like to see a bunch of cucumber tests written for a simple app (like the leaderboard and/or todos app) – anyone know of something like this?
Based on my fairly limited experience:
I think Meteor testing is definitely at the stage where investing the hours of learning is worthwhile.
I’m quite impressed with the velocity project and how much easier it makes testing. I don’t have much past experience to compare it with, but I’ve found the testing capabilities of the packages mentioned above to cover everything I need.
I think velocity gives you a really good leg-up into testing. Personally, I need to see a few more examples of testing done well, but I think that’s just a case of me having to go looking around the Meteorverse a bit.
xolvio:cucumber with the velocity html reporter to be pretty handy. For other frameworks, I know that @awatson1978 has done some serious work with starrynight for industrial strength testing, but I don’t know too much else about it.
The post I mentioned above got me up and running with
xolvio:cucumber and I was lucky enough to have someone else bootstrap a test suite for my package using
sanjo:jasmine. I find that looking at tests for code I’m familiar with to be the quickest way to learn patterns and syntax.