Up to date for Android Studio 4.2.1, Kotlin 1.5 & Mockito 2.1.0
A book that teaches you to write sustainable, testable apps, as well as to apply testing strategies to legacy projects via Espresso and UI tests, code coverage and refactoring.
Learn Test-Driven Development on Android!
Writing apps is hard. Writing testable apps is even harder, but it doesn’t have to be. Reading and understanding all the official Google documentation on testing can be time-consuming — and confusing.
In this book, you’ll learn about Android test-driven development the quick and easy way: by following fun and easy-to-read tutorials. Learn to write sustainable, testable apps, as well as to apply testing strategies to legacy projects via Espresso and UI tests, code coverage and refactoring.
This book is for the intermediate Android developers who already know the basics of Android and Kotlin development but want to learn Android test-driven development.
Topics Covered in This Book
- Getting Started with Testing: Learn the core concepts involved in testing including what is a test, why should you test, what should you test and what you should not test.
- Test-Driven Development (TDD): Discover the Red-Green-Refactor steps and how to apply them.
- The Testing Pyramid: Learn about the different types of tests and how to organize them.
- Unit Tests: Learn how to start writing unit tests with TDD using JUnit and Mockito.
- Integration Tests: Writing tests with different subsystems is a must in today’s complex application world. Learn how to test with different subsystems including the persistence and network layers.
- Architecting for Testing: Explore how to architect your app for testing and why it matters.
- TDD on Legacy Projects: Take your TDD to the next level by learning how to apply it to existing legacy projects.
Who is this book for
This book is for the intermediate Android developers who already know the basics of Android and Kotlin development but want to learn Android Test-Driven Development.
Concepts covered in this book
- Getting Started with Testing
- Test-Driven Development (TDD)
- The Testing Pyramid
- Unit Tests
- Integration Tests
- Architecting for Testing
- TDD on Legacy Projects