Book Image

Learning Android Application Testing

Book Image

Learning Android Application Testing

Overview of this book

Table of Contents (16 chapters)
Learning Android Application Testing
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a sample project – the temperature converter


You might have guessed it from some of the code snippets so far, that our TDD examples will revolve around an extremely simple Android sample project. It doesn't try to show all the fancy Android features, but focuses on testing and gradually building the application from the test, applying the concepts learned before.

Let's pretend that we have received a list of requirements to develop an Android temperature converter application. Though oversimplified, we will be following the steps you normally would, to develop such an application. However, in this case we will introduce the Test-driven Development techniques in the process.

List of requirements

Usually (let's be honest), the list of requirements are very vague, and there are a high number of details not fully covered.

As an example, let's pretend that we receive this list:

  • The application converts temperatures from Celsius to Fahrenheit and vice-versa

  • The user interface presents two fields...