ABSTRACT

In the previous chapter on Unit Testing (Chapter 20: Unit Testing), you learned to test the logic of functions, classes, and methods. Later, in the Widget Testing chapter (Chapter 21: Widget Testing), you learned to test widgets. In this chapter, you will learn to test an app on a real device while interacting with other system-level components. Integration testing allows running multiple pieces together. It's useful to test the performance of an app on real hardware. Integration testing is done using two files known as ‘test pair’. The first file deploys the instrumented application to the test device. It could either be a real device or an emulator. The second file contains the test cases that drive the application to execute the app's actions. In this chapter, you will learn to setup and write a test suite for integration tests. The test suite will test the CounterApp functionality end-to-end by increasing and decreasing the counter displayed on the screen and verifying the results.