Python Tutorial #17: Testing with pytest — Write Tests That Matter

In the previous tutorial, we learned about type hints. Now let’s learn about testing — how to write tests that catch bugs and give you confidence to change your code. Testing is one of the most valuable skills you can learn as a developer. It saves time in the long run, makes refactoring safe, and serves as living documentation. When you have tests, you can change code confidently — if the tests pass, you know nothing is broken. By the end of this tutorial, you will know how to write tests with pytest, use fixtures, parametrize tests, and mock external dependencies. ...

April 29, 2026 · 11 min

KMP Tutorial #13: Testing in Kotlin Multiplatform

You have shared code running on Android and iOS. But how do you know it works correctly on both platforms? You test it. KMP has built-in support for testing. Tests written in commonTest run on every platform automatically. Write once, verify everywhere. Test Source Sets KMP projects have test source sets that mirror the main source sets: shared/src/ ├── commonMain/ → shared code ├── commonTest/ → tests for shared code (runs on all platforms) ├── androidMain/ → Android-specific code ├── androidTest/ → Android-specific tests ├── iosMain/ → iOS-specific code └── iosTest/ → iOS-specific tests Tests in commonTest are the most valuable — they verify your shared logic on every target platform with a single test file. ...

April 5, 2026 · 7 min

Jetpack Compose UI Testing: performScrollTo, performScrollToNode & Gestures

Your app works when you manually tap through it. But does it work after your next code change? And the one after that? Manual testing doesn’t scale. You can’t tap through 50 screens after every change. That is what automated tests are for — and Compose makes testing surprisingly easy. Why Test Compose UI? Three reasons: Catch bugs before users do — tests run in seconds, not minutes of manual tapping Refactor with confidence — change code, run tests, know nothing broke Document behavior — tests show WHAT the UI should do Setup Add the testing dependencies to app/build.gradle.kts: ...

March 24, 2026 · 9 min

AI Test Generation: How AI Writes Better Tests Than Most Developers

Writing tests is the thing most developers know they should do but often skip. It takes time. It is boring. And when deadlines are tight, tests are the first thing to go. AI changed that. In 2026, AI tools can generate comprehensive tests for your code in seconds — often catching edge cases you would miss yourself. But how good are these tests really? Can you trust them? And which tools should you use? ...

March 23, 2026 · 9 min

Kotlin Tutorial #25: Testing in Kotlin — JUnit 5, MockK, and Best Practices

In the previous tutorial, you built a REST API with Ktor. Now let’s learn about testing. Good tests make your code reliable and give you confidence to refactor. In this tutorial, you will learn how to write tests in Kotlin using JUnit 5 and MockK. In this tutorial, you will learn: JUnit 5 basics (@Test, @BeforeEach, @Nested) Assertions (assertEquals, assertTrue, assertThrows) Parameterized tests (@ParameterizedTest, @ValueSource, @CsvSource) MockK (mock, every, verify) Argument capture and verification order Testing coroutines with runTest Test organization and best practices Setting Up Add MockK and coroutines-test to your build.gradle.kts: ...

March 22, 2026 · 8 min