Chapter 8. Logging, Debugging, and Testing

In this chapter, we'll cover the following recipes:

  • Using Ember.Logger
  • Using Ember Inspector
  • Verifying deprecations and using advanced features of Ember Inspector
  • Using acceptance testing
  • Using unit tests
  • Testing components
  • Testing routes
  • Testing models
  • Testing controllers

Introduction

Testing is an important part of the Ember framework. Ember allows three different classifications of tests—acceptance, unit, and integration.

Acceptance tests are used to test the application flow and interaction. It mimics the same actions that a user might have. For example, this could include filling out forms or navigating to different parts of an application.

Unit tests are used to test smaller chunks of functionality. This might include testing computed properties or checking fields for different element tags.

Integration tests are somewhere in between unit and acceptance tests. It's recommended to use them with component testing. For example, integration tests work well with testing UI and controls.

Creating test cases for your applications is a good practice, especially if this application will be used in production.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset