# Android Testing: A Rough Guide

DevFeed: [Android Testing: A Rough Guide](<https://devfeed.tech/articles/android-testing-a-rough-guide-26040.md>)

Original publisher: [Read original article](<http://doridori.github.io//android_testing_a_rough_guide/>)

Author: SystemDotRun

Published: 2015-02-27T00:00:00Z

Content type: article

Language: en

Sources: [SystemDotRun](<https://devfeed.tech/sources/systemdotrun.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Development](<https://devfeed.tech/topics/development.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>), [APK](<https://devfeed.tech/topics/apk.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [apk](<https://devfeed.tech/tags/apk.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [automated](<https://devfeed.tech/tags/automated.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [guide](<https://devfeed.tech/tags/guide.md>), [junit](<https://devfeed.tech/tags/junit.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

A rough guide to the author's approaches to automated testing on Android, covering testing strategies, TDD, test tooling, device and emulator tests, test APKs, JUnit 4, and JVM tests. The article argues that writing tests encourages developers to think about software architecture.

## Source excerpt

Do you have a go-to approach when writing automated tests on Android? Every project I work on has a different testing strategy, and each time I learn something new along the way. This post is a rough outline of my approaches to automated testing on Android (including past, present & future). The post serves 3 purposes: Writing stuff down always helps me think about what Im actually doing and if it makes sense. For others who have less experience writing tests; this will hopefully offer some ideas of paths to explore. For others with more experience; you can give me some hints of what I'm missing! Im not going to talk much (or at all) about how you use the tools, otherwise this post would be huge. This is more on a jumping off point for further exploration :) It there is something you want more info on, investigate it, write a post about it, and I can link to it here! Why test? Automated testing and TDD is one of those things in software development that some love and some hate (actually, what isn't like that in dev?!). Regardless of what side of the fence your on there is one thing thats hard to argue against, writing tests forces you to think about your software architecture. I think actually this is main thing I like about it, but probably not its biggest advantage. Testing on Android In the past I have felt like we were short-changed in the Android world when it comes to testing, compared to other languages or frameworks that have been designed from the start to ease the path of testing (i.e. RoR). But the tools are improving all the time which is fantastic. Edit: After starting this I listened to Episode 1 of the new Fragmented podcast, which is interesting as they echo my thoughts here exactly! Tooling Test Frameworks There are a number of ways to run your tests, the simplest first choice to me seems to run them on a device or emulator via a test apk (see below for emulator choices) rather than using something like Roboelectic (which lots of people do like and