Shape Shape point chapter-list Group Group Group Shape Copy 12 Shape Shape Copy 3 Shape Shape dropdown editor editor Combined Shape grid Shape Copy 4 Shape Copy 7 Shape language language Shape megaphone paperback Shape platform noun_419259-2 copy play-icon BS-Question-Rounded-Circle quotes noun_610406 stacked-books-1 stacked-books-2 Group Group Group Group Group
New

Android Test-Driven Development by Tutorials

$59.99 5/5 1 review · Write a Review
  • Platform Android 10
  • Language Kotlin 1.3
  • Editor AS 3.5

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.

Developer Guide

Intermediate

For Intermediate Developers

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.

Table of Contents

Section I: Introduction to Test-Driven Development

1.

Introduction - New

If you're new to testing and want an overview of what this book covers, start with chapter 1 for a gentle introduction into testing.

2.

What Is a Test? - New

Do you know why you should test or what to test? In this chapter, "What is a Test?", you'll learn both of these and also dive into code coverage

3.

What Is TDD? - New

Now that you know what a test is, start writing your first tests! Not only will you start writing tests, but you'll also do so in a test-driven development way.

Section II: Testing on a New Project

4.

The Testing Pyramid - New

If you're wondering how UI tests, integration tests and unit tests all fit into one application, learn about the testing pyramid and how you can structure various types of tests for your app.

5.

Unit Tests - New

Get your drink ready as you explore a cocktail app and write your unit tests in Android practicing test-driven development.

6.

Architecting for Testing - New

The architecture of your project can make or break your testing experience. Learn the pros and cons of each architecture and how they affect your tests.

7.

Introduction to Mockito - New

Level up your testing knowledge leveraging Mockito as you learn the basics of how to use mocks and spies in your tests.

8.

Integration - New

Often, you're going to have to test the interaction between objects in your application. In this chapter, you'll practice writing integration tests by working on a Wishlist app.

9.

Testing the Persistence Layer - New

Get started learning how to test the persistence layer in your app. In this chapter, you'll learn how to handle statefulness in your tests and strategies for creating randomized test data.

10.

Testing the Network Layer - New

While HTTP requests can be unpredictable, your tests don't have to be. In this chapter, learn how to write predictable network tests working on the Punchline app. Learn some random jokes on the way as well!

11.

User Interface - New

While HTTP requests can be unpredictable, your tests don't have to be. In this chapter, learn how to write predictable network tests working on the Punchline app. Learn some random jokes on the way as well!

Section III: TDD on Legacy Projects

12.

Common Legacy App Problems - New

Automated tests can help catch bugs in all applications, including legacy applications. Learn how to work around technical debt and apply testing techniques.

13.

High-Level Testing with Espresso - New

Get started with the Coding Companion Finder app as you work through a legacy application and write UI tests using Espresso.

14.

Hands-On Focused Refactoring - New

Refactoring a legacy application doesn't have to be scary once you have some tests for it. Learn how to take small steps and move slowly as you keep your test suite green as you make changes to your app.

15.

Refactoring Your Tests - New

Your tests are code too. In this chapter, you'll learn how to refactor both your app code and test code to make your tests reliable and maintainable.

16.

Strategies for Handling Test Data - New

Learn multiple ways to handle test data in your Android tests by learning by tutorials. In this chapter, you'll explore a variety of ways of using test data in your tests.

17.

Continuous Integration & Other Related Tools - New

Explore what it means to have continuous integration for your tests and the tools you can use to achieve it. You'll learn the pros and cons of different CI strategies in this chapter.

18.

Testing Around Other Components - New

Set boundaries in your test and use strategies to help to interact with other libraries and parts of the Android framework.

19.

Other Related Techniques - New

Learn about other techniques that can complement your TDD process to make your team more collaborative and therefore effective.

Meet the team

Average Rating

5 /5

Leave a review for this product

1 review

Android Test-Driven Development by Tutorials

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.

Top