How to run unit test groups using gradle in Android

I am trying to run a specific group of unit tests on our CI server, and not in our dev environment. I tried several approaches

1) Using JUnit categories. I could not get this to work with gradle

2) Use. / gradlew test --tests * ServiceTest

It never found my tests.

3) An attempt to use build options to include / exclude certain tests. It did not seem flexible enough.

Is there any concrete example of how to do this?

+4
source share

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


All Articles