Chapter 9. Previewing, debugging, and automated testing

 

This chapter covers

  • Previewing your app using Ionic View and Ionic Lab
  • Debugging from a device or emulator on iOS and Android
  • Setting up and writing automated tests for your app

Get ready: we’re going to cover a lot of ground in this chapter about how to preview, debug, and properly test your app. The purpose of this chapter is to help you better manage quality in your app over time. You may recognize in projects you’ve worked on in the past that code maintainability tends to suffer and applications become more complex over time. It takes work and discipline by developers to counteract these trends, and this chapter identifies some tools that will help you do exactly that.

9.1. The differences among previewing, debugging, and testing

Let’s dissect these three terms—previewing, debugging, and testing—a little bit before we jump into the chapter. The differences are highlighted in figure 9.1.

Figure 9.1. Key aspects of previewing, debugging, and testing apps

9.2. Setting up the chapter example

9.3. Additional ways to preview apps

9.4. Debugging from a device

9.5. Automated testing

9.6. More test examples

9.7. Summary