Testing Basics - Google Codelab

Опубликовано: 01 Август 2026
на канале: Mango Burrito
530
8

You'll learn about the following topics:

How to write and run unit tests on Android
How to use Test Driven Development
How to choose instrumented tests and local tests
You'll learn about the following libraries and code concepts:

JUnit4
Hamcrest
AndroidX Test Library
AndroidX Architecture Components Core Test Library
What you'll do
Set up, run, and interpret both local and instrumented tests in Android.
Write unit tests in Android using JUnit4 and Hamcrest.
Write simple LiveData and ViewModel tests.

Welcome: (00:35)
App overview: (03:15)
Getting Started: (03:57)
Familiarizing yourself w/ the code: (04:35)
Running tests: (12:13)
Writing your first test: (20:51)
Writing your more tests: (35:48)
ViewModel Test w/ AndroidX Test: (49:04)
Writing Assertions for LiveData: (01:04:06)
Writing multiple ViewModel tests: (01:14:30)
Solution Code: (01:18:27)
Summary: (01:18:32)