You need to have an emulator already running. This task builds the app and tests and runs them on all connected devices (real or emulated).īut the gradle task is limited in that it only runs the tests. These types of test are known as Android Instrumentation Tests.Ĭonveniently, there is an out-of-the-box gradle task called connectedAndroidTest that can be used to run Instrumentation Tests. There is a separate suite of tests that employs Espresso to test the app using the user interface, and these need an emulator (or real device) to run on. My unit test suite uses Robolectric, which means the tests don’t need an emulator to run. In this post, I’m going to document what I learned while writing an Android test script. I found helpful bits and pieces all over the place-from Stack Overflow answers to blog posts talking about how to get Android into various CI servers ( Travis, Jenkins, etc.)-but the information was scattered. I recently spent some time working through ways to automate running an Android test suite on my MacBook Pro.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |