Chapter 8. Testing your Ember.js application

 

This chapter covers

  • Testing strategies for JavaScript applications
  • Using QUnit and PhantomJS for unit and integration testing
  • Combining these tools for a complete testing strategy
  • Exploring integration testing
  • Using Ember Instrumentation for quick performance measurements

Even though JavaScript has matured significantly over the past five years, in a couple of areas you’ll notice that you’re working with a project that still has some maturing to do. Testing is one of these areas, leaving a lot of the required decisions up to application developers. This chapter outlines how you can successfully test your own Ember.js applications and presents a real-world implementation of one possible test harness.

As with applications written in other languages, you can test your application in multiple ways, including these:

  • Unit testing
  • Integration testing
  • Performance testing
  • Regression testing
  • Black-box testing
  • Continuous integration (CI)

You might not need to implement a solution for all of these testing types in your own application. Chances are, though, that you’ll need several, even though unit testing and integration testing are the most common types of test harnesses for JavaScript applications.

8.1. Performing unit testing with QUnit and PhantomJS

8.2. Writing a simple Ember.js unit test with QUnit

8.3. Performing integration testing

8.4. Using Ember.Instrumentation for performance testing

8.5. Summary

sitemap