Module 12 of 12

Testing & Tooling

Lessons

About This Module

Professional Kotlin code comes with tests and a reliable build setup. You'll learn how to write unit tests with JUnit, and how to use MockK, a mocking library designed for Kotlin, to isolate the code you're testing from its dependencies.

You'll also learn the build tooling behind most Kotlin projects: Gradle with the Kotlin DSL, where build scripts are written in Kotlin itself (build.gradle.kts). That covers plugins, dependencies, and keeping your project organized as it grows.

Watch the lessons in order, then put everything together in the Projects.

Lessons

4 videos
01

Master Kotlin Testing: Unit Tests and MockK Explained for Beginners

A step-by-step guide to writing effective unit tests in Kotlin using the MockK library.

02

Android Unit Testing with JUnit 5, MockK & Kotest

Shows how to write unit tests, UI tests, and instrumentation tests for an Android app using Kotlin.

03

Gradle with Kotlin DSL: Complete Beginner’s Guide to Type-Safe Build Configuration

A tutorial on configuring Gradle builds with the Kotlin DSL, from the basics to more advanced concepts.

04

The Ultimate Gradle Kotlin Beginner’s Crash Course For 2025

A beginner’s crash course to Gradle with Kotlin, aimed at what you need in everyday Android work.