Testing Meteor Apps with Laika
Ever since we started working on our book, one of the most frequently asked questions was how to test Meteor apps. But we had to admit that we simply hadn’t found a good solution yet, which is why the book didn’t cover testing at all.
And if the importance of testing wasn’t clear enough, it also came in first when we ran a poll asking you which topics you’d like to see us address in our next screencasts.
All this to say that we’re happy to finally have an answer to this question, thanks to Arunoda Susiripala’s Laika testing framework. We wanted to share the good news with the whole Meteor community, so we asked Arunoda to record a screencast to introduce Laika:
Note that you can find part 2 of this screencast in Discover Meteor’s Premium Package. In it, Arunoda shows how to use Laika to create tests for Microscope, the app that you’re building in the book.
A Few Questions
Also, we weren’t familiar with Arunoda’s work until recently so we thought we’d also ask a few questions to get to know him better.
Sacha: Can you introduce yourself? What’s your background, and how did you discover Meteor?
Meteor is pretty new to me. A few months back I tried to learn Meteor, but I got stuck and really didn’t like it. But one of my clients paid me to learn Meteor in order to work on their future project. Fortunately it was at the time that Discover Meteor launched, and now I really like Meteor.
What made you decide to work on Laika? Did you try other ways of testing Meteor apps before creating your own?
If you ever want to make solid apps, you must write tests. And that is a practice I followed from day one when I started to work with NodeJS. One of major drawbacks of Meteor was that it had no official testing framework.
I really wanted one, and so did my client. So I began looking into some of the exiting solutions out there. There were some, but at that time they were just prototypes. So I decided to come up with my own way to do testing. That’s how Laika came to be.
I started initial work 2 weeks ago and it went really well. Within a week I was able to make it work. That’s how Laika started, and I’m planning on using it for a few production apps and improving over the time.
Are you working on your own Meteor projects?
I working on a production quality (large scale) Meteor app right now. Beside that I released Meteor-cluster a few weeks ago, which is a package that allows you to scale Meteor very easily.
My newest project is MeteorHacks. I wanted to do experiments with Meteor and implement some feature ahead of the roadmap, so that’s why I started MeteorHacks. I’ll be posting results of my experiments there and it will be fun.
How would you like to see Meteor evolve in the future? Which feature are you looking forward to the most?
I think it’s time for Meteor focus on core API and encourage people to build packages. And I’m looking forward to see Meteor’s solution to building production-quality apps.