Testing
Testing your app is an integral part of the app development process. By running tests against your app consistently, you can verify your app’s correctness, functional behavior, and usability before you release it publicly. We recommend using instrumented tests only in cases where you must test against the behavior of a real device.
An instrumented test is a test that runs on a real device or emulator. It is a test that runs against the compiled code of your app, and it can be used to test the behavior of your app’s UI. For example, you can use an instrumented test to verify that your app’s UI responds correctly to user input.
Testing user interactions helps ensure users do not encounter unexpected results or have a poor experience when interacting with your app. You should get into the habit of creating user interface (UI) tests if you need to verify that the UI of your app is functioning correctly.
For more information about testing in Compose, see Testing your Compose layout.