Book Image

Android Application Testing Guide

By : Diego Torres Milano
Book Image

Android Application Testing Guide

By: Diego Torres Milano

Overview of this book

<p>It doesn't matter how much time you invest in Android design, or even how careful you are when programming; mistakes are inevitable and bugs will appear. This book will help you minimize the impact of these errors in your Android project and increase your development productivity. It will show you the problems that are easily avoided, to help get you quickly to the testing stage.<br /><br />Android Application Testing Guide is the first and only book providing a practical introduction to the most common available techniques, frameworks, and tools to improve the development of your Android applications. Clear, step-by-step instructions show how to write tests for your applications and assure quality control using various methodologies.<br /><br />The author's experience in applying application testing techniques to real world projects enables him to share insights on creating professional Android applications. <br /><br />The book starts by introducing Test Driven Development, which is an agile component of the software development process and a technique where you will tackle bugs early on. From the most basic unit tests applied to a sample project to more sophisticated performance tests, this book provides a detailed description of the most widely used techniques in the Android testing world in a recipe-based approach.<br /><br />The author has extensive experience of working on various development projects throughout his professional career. All this research and knowledge has helped create a book that will serve as a useful resource to any developer navigating the world of Android testing.</p>
Table of Contents (17 chapters)
Android Application Testing Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

TemperatureConverter code coverage


We built Android from source to be able to obtain code coverage analysis reports for our projects mainly for two reasons:

  • We need an EMMA instrumented build, which is what we did in previous sections

  • To be able to instrument an application, this application should be built as part of the main build tree, and this is what we will be doing now;

A possible location for our application and tests inside the main Android tree could be development/samples, so we are going to use it. Should you decide on a different location, minor adaption might be needed in the files and commands presented here.

We already have our TemperatureConverter project and its tests TemperatureConverterTests somewhere in our filesystem, and if you followed the examples presented before they are probably checked into the version control system of your choice, so the options here are checking out the project again at this location or creating a symbolic link. Let's choose the latter for the...