Android Test-Driven Development byTutorials - raywenderlich Tutorial Team, Lance Gleason, Fernando Sproviero, Victoria Gonda

Android Test-Driven Development byTutorials

raywenderlich Tutorial Team, Lance Gleason, Fernando Sproviero, Victoria Gonda

出版社

Razeware LLC

出版时间

2019-09-30

ISBN

9781942878902

评分

★★★★★

标签

20212020

书籍介绍
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. This is where Android Test-Driven Development comes to the rescue! In this book, you'll learn about Android Test-Driven Development the quick and easy way: by following fun and easy-to-read tutorials. 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 Android Test-Driven Development 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. And much more, including Espresso tests, UI tests, code coverage and refactoring. One thing you can count on: after reading this book, you’ll be prepared to take advantage of Android Test-Driven Development in your own apps!
用户评论
读了一遍第二版,超出意外。基本上给出了 Android TDD 的实践步骤以及一些最佳实践。尽管 sharedTest 那块的思想很简单,但是该部分也是最为惊喜。我是最近才明白 跑在 JVM 上的 Robolectric 测试和跑在 emulator/real device 上的 Espresso 测试并不是完全割裂的,而是可以通过 sharedTest 共享的。这样很多测试可以先通过 JVM 快速运行达到 TDD 的要求,同时也可以通过 emulator/real device 做双重校验。
收藏