android - Unit testing and UI testing

Asked

Viewed 126 times

-1

Good morning friends,

lately I have seen some videos and blogs on the subject, and wanted to know who usually works with tests if it is really worth using tests on Android dev.

And if so, which frameworks have better usability for it.

I was quick to use the JUnit 4 and read about the uiautomatorviewer but I never used.

1 answer

0

It is always worth testing. Each Framework has its scope of use. Junit4 serves, for example, for unit tests that do not rely on Android components to run (e.g., class testing, some method of calculation or string manipulation, etc.), so they run directly from Android Studio and do not need a mobile phone or emulator running. Espresso is for interface testing (click buttons, screen opening, intents, Providers, Asynctasks, etc). Uiatimatorviewer is for testing outside the scope of the application (Ex: another application passing data to yours or vice versa).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.