How are you testing your Ember app?


#1

My team is searching for a solution on how we can test our Ember application. We are curious on how the Ember community is testing theirs. So I decided to post this, and hope to hear some good ideas from you guys. Thanks for the replies in advance!

What are you using for unit testing?

Are you using qunit and running tests in the browers? Are you using testem, karma, etc?


#2

We are exclusively developing with Ember CLI so our QUnit test suite can be run in the browser or command line. If you haven’t looked at Ember CLI yet take a peek, you will be positively surprised!


#3

There is a rather extensive Testing Guide on the Ember.js website. Lots of ideas there.

Most Ember projects use Ember’s testing mode, QUnit, ember-qunit for nice setup helpers, and Pretender or something similar for HTTP mocking. These are provided out of the box with ember-cli, though I have seen many projects use them without ember-cli.

ember-cli implements livereload, so simple CI is as easy as leaving a browser window open with the tests. It also comes with a phantomJS runner out of the box for use on CircleCI, Travis, or another hosted CI solution. Testem is sometimes used, but I don’t usually touch it.

You could test an Ember app with Mocha or any arbitrary runner, but QUnit (for better or worse) is the most documented path.