android - Unit tests and UI tests

-1

Good morning, friends,

Lately I have seen some videos and blogs on the subject, and wanted to know of those who usually work with tests if it is really worth using tests on Android Dev.

And if so, which frameworks have the best usability for this.

I gave a quick use in JUnit 4 and read about uiautomatorviewer but I did not get to use it.

    
asked by anonymous 29.05.2017 / 15:43

1 answer

0

It's always worth testing. Each Framework has its scope of use. Junit4 serves, for example, for unit tests that do not depend on Android components to run (eg class testing, some calculation method or string manipulation, etc.), so they run directly from Android Studio and do not need a mobile or emulator running. Already the Espresso is for testing of interface (button click, screen opening, intents, Providers, AsyncTasks, etc). The UIAtimatorViewer is for tests outside the scope of the application (eg, another application passing data to yours or vice versa).

    
29.05.2017 / 16:25