vendredi 9 juin 2017

Android: running instrumental tests on TeamCity server

I am building an Android Studio/Gradle project on TeamCity server. I am somewhat new to TeamCity. Currently, the unit tests auto-generated by Android Studio are run automatically when the project is built on TeamCity and are displayed under "Tests" . I also have an instrumented test (a test which runs on the connected android device), but it does not get run automatically like the unit tests do.

My solution was to add a Gradle build step in TeamCity to run the instrumented test. So far, I've had little success. I used the gradle tasks

uninstallAll connectedAndroidTest

which runs the instrumented test, but the test result does not show up under "Tests" along with the unit tests. If the instrumented test fails, the build fails, but the failed test still does not show up under "Tests".

What am I doing wrong? Is there a correct way to run instrumented tests on TeamCity?

Aucun commentaire:

Enregistrer un commentaire