One of the major goals whether it’s on the Android platform or not is to isolate the code that we’re testing. When we write our tests we should be testing a single method and not its dependencies such as a web service.
Android apps fail for a number of reasons other than simple logic errors. At its most basic the app may not install correctly, or there may be a problem when you move from landscape to portrait and back again.
JUnit on its own may be all you need but there are a number of excellent third party tools that you can bolt onto JUnit that really make your Android testing shine.
Before Android Studio incorporated JUnit4, Google’s implementation was an odd mix of standard and Android specific unit tests.
Agile development has been problematic for Android developers. For a while now there have been a number of ways to test the user interface such as Robotium or Monkey Runner but before Android Studio 1.1, unit testing was hard to use, hard to configure and quite challenging to implement on the Android platform.
Most Android apps that do any real work operate in a client – server architecture with the phone acting as the client and much of the heavier work taking place on the backend server.
Typically Android security issues fall into a couple of major categories, these are firstly, personal information stored insecurely on the phone and secondly, insecure communication to any back end database or web server. And while there are lots of other things that can go wrong the majority of the problems fall into these two areas. In this article let’s start with your options to secure someone’s information and in the next article we’ll look at network communication.