
Discover Android testing essentials, from unit tests and integration tests to ui tests, covering room databases, fragments, live data, and view models; learn to use Hilt for robust, testable apps.
Explore the fundamentals of Android testing, covering unit tests, integration tests, and UI tests, and learn how to allocate testing effort with a 70/20/10 focus using Jetpack components.
Build a simple tax calculator app in Kotlin with a tax repository to compute net tax and net income, and illustrate basic testing fundamentals within an mvvm-inspired architecture.
Write and run your first unit test in Android using JUnit, focusing on test vs android test, with Kotlin examples and Truth for assertions.
Explore test driven development, or TDD, in Android testing, learn to write tests before code, use before/after hooks, keep one assertion per test, and validate results with JUnit unit tests.
Build an art book app from scratch using retrofit for images, a room database for storage, and a recycler view, with Hilt, LiveData, view models, and navigation.
Set up an Android Studio project for the art book testing app, configure Gradle with Hilt, and design the arts fragment with a recycler view and anchored floating action button.
Design and implement Android fragments and recycler rows to display art items with image, name, artist, and year, plus a detail input fragment and image search UI.
Learn to implement navigation with a navigation graph and view binding to connect art, details, and image api fragments.
Learn to set up a room database with art entities and a DAO, wire fragment bindings and navigation, and implement back press handling to store and display art data.
Set up Retrofit with Hilt to access the Pixabay API across the app, modeling the image response and wiring a Retrofit interface for image search using an API key.
Learn to implement dependency injection with Hilt by creating an application class, modules, and providers for Retrofit, Room database, and DAO, plus Retrofit base URL and JSON converter.
Create a repository interface and implementation to manage arts via DAO and Retrofit, enabling a fake repository for unit tests and using Hilt, LiveData, and Resource for testable data handling.
Build a clean mvvm architecture by wiring a view model to a repository with di, exposing live data for art, images, and insert status.
Create a fragment factory to control fragment instantiation with dependencies, injecting adapters and Glide, and wire it into the main activity as an Android entry point for Hilt-driven injection.
Design two recycler adapters for art and image lists, leveraging DiffUtil and a recycler list differ for efficient, asynchronous updates, and integrate Glide for image loading.
Build an art fragment with a dedicated image recycler adapter and Glide-loaded URLs. Wire it through a view model with dependency injection and enable swipe-to-delete actions.
Finishing the application by wiring fragments, implementing view models and room storage, loading selected images, and validating save flows, while outlining unit, integration, and UI tests.
Explore unit testing a view model with a fake art repository that implements the repository interface, avoiding internet calls, and apply testing doubles in tests.
Demonstrates unit testing a ViewModel with LiveData by validating art insertion with missing fields (name, year, artist) using a fake repository and helper utilities to convert LiveData to test data.
Test the room database by validating the art DAO's insert and delete operations using an in-memory test database in Android tests, with setup, teardown, and runBlocking test scopes.
Explore Hilt testing to inject dependencies in Android tests, enabling an in-memory room database for faster unit tests, guided by the Android developer documentation.
Learn to test fragments with Hilt using container launch, fragment factory, and a Hilt container, then verify navigation from art fragment to art details with Espresso and Marketo.
Test the art details fragment with espresso to verify navigation to the image api fragment, back navigation, and saving art to the room database using hilt and view models.
Test the image api fragment's recycler view by selecting an item to pass its image url to the live data via a view model, using Hilt, Espresso, and navigation checks.
Welcome to the Android Testing Course!
If you are an Android Developer who is looking for to learn about testing your mobile applications, you came to the right place!
This course is for Android Developers who at least have intermediate knowledge for Kotlin and Android Development. We will learn about testing and create an application from scratch with using Jet Pack components to test it as well. All course will be completely hands-on experience.
Course is presented by Atil Samancioglu who serves more than 250.000 students worldwide on Mobile Application Development & Cyber Security. Atil also teaches Android Development in Bogazici University. Course is made with cooperation of Codestars, serving more than 1.5 million students worldwide!
Some of the topics that we are going to cover during the course:
Unit Tests
Integration & UI Tests
Testing with Hilt
Testing Fragments
Testing ViewModels
Testing LiveData
Test Doubles
Mockito & Espresso
JUnit
Testing Room
TDD Principles
Testing Navigation
If you are on your way to become a professional Android Developer, this course has everything you need, especially in the testing side of things. We will create an application called Art Book from scratch and test it together to practice everything that you need to know about testing Android applications.
All codes will be shared by us via GitHub and you can ask any question via Q&A to reach the instructor.
This course is eligible for the Codestars Certificate Authority (CCA) certificate. Students can take the official exam via codestarscom, and those who pass the quiz will receive their CCA certificate. (more details in the course!)
Happy coding!