vendredi 20 février 2015

Android Studio unit testing support vs robolectric

Hitherto I used robolectric unit testing with JUnit 4.x for testing my business logic. In the last version of Android Studio 1.1.0 was announced native support of unit testing junit:4.+.


Should I refuse using robolectric? Has robolectric some distinct advantages that I might not know?


As for me using Android Studio native tests more convenient and simpler. In the robolectric test results are stored in html file and can be displayed in the browser(which not convinient for me). Native Android Studio test results are displayed in the Run output window, if some test fails, we can easily open this line of code by clicking on the error in the output window.


Aucun commentaire:

Enregistrer un commentaire