What is the best and most convenient tool for unit test apps for Android?

I am developing an Android application for a small company, and during the development process we need to re-test some modules. Therefore, I was looking for tools for testing automation (unit testing) of an application. Android has a unit test tool, however, it takes more time to write these test cases to actually test it manually.

I found some applications that do some great things and provide good diagrams like Robolectric, robotium, fonemonkey4android, but I am confused about what to use, anyone who has experience with it can help.

I checked previous questions on similar conditions like below https://stackoverflow.com/questions/522312/best-practices-for-unit-testing-android-apps

But all the streams are very old and not so informative as to decide which choice.

+6
source share
1 answer

I think first you need to find out what part of your code you want to check.

For codes that are not related to the user interface, you can test them with Robolectric. With Robolectric, the unit test code is the same as for a java application. But it is not suitable for testing ui components.

If you want to check ui, then you can choose robotics. But I always doubt whether it is worth writing tests for ui, they change too often.

+2
source

Source: https://habr.com/ru/post/908965/


All Articles