There are two possible modes of testing activities:
Functional testing: In functional testing, the activity being tested is created using the system infrastructure. The test code can communicate with the Android system, send events to the UI, or launch another activity.
Unit testing: In unit testing, the activity being tested is created with minimal connection to the system infrastructure. The activity is tested in isolation.
In this chapter, we will explore the Android testing API to learn about the classes and methods that will help you test the activities of your application.