mardi 27 janvier 2015

Android Studio JUnit tests as part of the build

I'm trying to setup a CI for my project and the first big step for me is to get Gradle to invoke my unit tests. As I understand Google has only recently fixed the JUnit integration with Android studio (starting from version 1.1) so there's next to no info on the web on how to do unit tests using vanilla studio. I have created a unit test and I can manually run it from the studio, however I'm trying to do the following now:


1) Include it as part of my Gradle build process 2) Make Jenkins drive the unit tests


I've tried a few things but nothing seems to work so far.. Has anyone managed to make it work? I suspect I'm just not specifying the right Gradle tasks...


Looks like Robolectric is the de facto unit test framework, however considering that Google are now catching up it would make sense to look into unit test framework that comes with the Studio..


Aucun commentaire:

Enregistrer un commentaire