Chapter 10. Ember Testing

If you’ve kept up with the Ember testing over the last year, there has been quite a bit of debate within the Ember community about testing best practices. Well, what would you expect? That’s just how testing goes. 

When putting together the testing strategy for this book, we wanted to base on it on our experience with real-world application development. In doing so, one of our guiding principles is to keep our strategy as simple as possible, without sacrificing test coverage.

We also wanted readable tests, because they act as the development team’s primary source of “enforced” and tested requirements. It is also important to us that our test runner be fast to ensure we are not impeding developer productivity, and we’d like the test runner to integrate with a CI server easily. Finally, it’s important to obtain test coverage over as much code that makes sense for our particular application.

We will explore a basic integration and unit-testing approach with a simple setup provided by Ember App Kit. This setup uses Qunit, Ember testing helpers, and the Testem test runner.

One thing that is certain is that there are as many testing strategies as there are development teams, so hopefully the following examples give you enough exposure to the basics for you to start formulating your own strategy to fit your application, team, and development timeline.

The Ember Guides provide a great reference for setting up a basic testing scenario, so we won’t ...

Get Building Web Apps with Ember.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.