UI Tests
UI tests are instrumented tests where developers can simulate user journeys and verify the interactions between different modules of the application. They are also referred to as end-to-end tests. For small applications, you can have one test suite, but for larger applications, you should split your test suites to cover particular user journeys (logging in, creating an account, setting up flows, and so on). Because they are executed on the device, you will need to write them in the androidTest
package, which means they will run with the Instrumentation framework. Instrumentation works as follows:
- The app is built and installed on the device.
- A testing app will also be installed on the device that will monitor your app.
- The testing app will execute the tests on your app and record the results.
One of the drawbacks of this is the fact that the tests will share persisted data, so if a test stores data on the device, then the second test can have access...