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

Introducing Robotium


One component of the vast emerging robotic fauna is Robotium (http://robotium.org), a test framework created to simplify the writing of tests, requiring minimal knowledge of the application under test. Robotium is mainly oriented to writing powerful and robust automatic black-box test cases for Android applications. It can cover function, system, and acceptance test scenarios, even spanning multiple Android activities of the same application automatically. Robotium can also be used to test applications that we don't have the source code for, or even pre-installed applications.

Let's put Robotium to work creating some new tests for TemperatureConverter. To keep our tests organized, we create a new package named com.blundell.tut.robotium in our TemperatureConverter project, under the androidTest directory. We will initially be testing TemperatureConverterActivity, it is reasonable to call it TemperatureConverterActivityTests, even though we already have a class with the...