Android Testing Guide
Android Testing Guide
$34.99
Minimum price
$49.99
Suggested price
Android Testing Guide

This book is 50% complete

Last updated on 2017-10-19

About the Book

Have you gotten your hands dirty with Android application development, but lack a reliable test coverage? Does your application testing procedure consist of just a series of manual view clicks? Do you spend hours testing your entire app everytime you want to make a release? Or do you just cross your fingers and hope for the best that everything will just work?

Don't worry, everyone has been there at some point. The only problem is that testing can be a tricky thing (especially in the Android world). In fact, it's quite possible that your codebase, as it currently stands, is untestable! What you may not realize is that, while, yes, testing does help to ensure that your code works as expected, following this pattern will also make you a better developer. That messy, untestable spaghetti code that you might have snuck into your project in the past will never happen again. Trust me, as soon as you bring the phrase "how could I test this?" to the forefront of every new piece of code you write, you'll, with a smile on your face, look back to your former self, and laugh at your crazy, cowboy ways. Welcome to modern software development world.

I'll show you how I got past that hurdle, started writing robust and more maintainable code, increasing my code's trustworthiness and saving countless hours of debugging unforeseen bugs.

As the book progresses towards completion, the price may gradually increase. By buying early you not only provide motivation, but you also get a good deal because you get all updates for free. The target date for next version is end of November.

  • Share this book

  • Installments completed

    1 / 3

About the Author

Ravindra Kumar
Ravindra Kumar

Ravindra Kumar is an Android Engineer,A Computer Polyglot from Bengaluru, India. Android + WEB ♥'r, speaker, startup geek, open source junkie.

He has a strong interest in code quality, testing and automation - preferably all three together. Combining technical with soft skills, he also ventures into the realms of mentoring and article writing, He hates doing things manually, and hates to see src/test/java directories with Empty Example classes.

He believes that by working with legacy code, and improving it, he can make the world a better place. To his disappointment, the world does not seem to care all that much about his efforts.

He started as a Web Engineer who used to write lots of javascript, but after some time, looking for his real passion, he started his journey in mobile app development though Titanium, later he discovered the Android world. After getting some experience on such an awesome platform, he started a new adventure at a mobile company, where he led several projects for important Indian companies.

He is a pretty normal person – a husband, father of one loves cricket.

Follow @ravidsrk on Twitter or email him at ravidsrk@gmail.com


Table of Contents

  • About the Author
  • About the Reviewers
  • Welcome
    • Exercises
    • Errata
    • How to Consume This Book
    • Get in Touch
    • Is this book for you?
  • Intro
  • 1 Test Everything
    • 1.1 You already know testing
    • 1.2 Takeaways from TDD
    • 1.3 What Should I Test?
    • 1.4 Signs of Untestable Code
    • 2.2 Beyond JUnit basics
    • 2.3 Rules
    • 2.4 Assertions
    • 2.5 Hamcrest
  • 3 Easier Testing With Mockito
    • 3.1 Why Mockito?
    • 3.2 Test Doubles
    • 3.3 Verify
    • 3.4 ArgumentCaptor
  • 4 Testing on Android
    • 4.1 Local Tests
    • 4.2 Instrumented tests
    • 4.3 Android test rules
    • 4.4 Rule to test Android Activity
    • 4.5 Rule to test Android Service
    • 4.6 Rule to test Android Intents
    • 4.7 Android instrumented tests
    • 4.8 Test filtering
  • 5 Espresso
    • 5.1 Basics
    • 5.2 Testing RecyclerView
    • 5.3 Testing Toast
    • 5.4 Testing Intents
    • 5.5 Testing Synchronisation with background jobs
    • 5.6 Espresso utils
  • 6 Robolectric
    • 6.1 Testing Activities
    • 6.2 Testing Fragments
    • 6.3 Testing Sqlite
    • 6.4 Testing Job Scheduler
  • 7 REST API Testing on Android.
    • 7.1 MockWebServer
    • 7.2 RESTMock
    • 7.3 WireMock
  • 8 Testing Android Persistance
    • 8.1 Testing Sqlite
    • 8.2 Testing Realm
    • 8.3 Testing Room
  • 9 Practical Android Testing
    • 9.1 Introduction to MVP, MVVM
    • 9.2 Testing Presenters
    • 9.3 Testing RxJava
  • 10 Kotlin Android Testing
    • 10.1 Issues
    • 10.2 Spek
    • 10.3 Mockito Kotlin
  • 11 Code Quality
    • 11.1 Checkstyle
    • 11.2 PMD
    • 11.3 Findbugs
    • 11.4 Code coverage with Jococo
  • 12 Continuous Integration
    • 12.1 Travis CI
    • 12.2 Circle CI
    • 12.3 BuddyBuild
    • 12.4 Bitrise
  • 13 Extra concepts
    • 13.1 Asserting with assertThat
    • 13.2 Assertj
    • 13.3 EasyMock
    • 13.4 PowerMock
    • 13.5 MonkeyRunner
    • 13.6 Robotium
    • 13.7 UI testing and UI Automator
  • 14 Misc
    • 14.1 Bad tests to Good tests
    • 14.2 Behavior-driven development
    • 14.3 Contributing to open-source
  • References

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. Free App. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub