Categoria: kotest
-
Automated Screenshot Taking in Android using Kotest and Ktor
1. Introduction Automated screenshot testing is essential in Android development for ensuring UI consistency across updates and devices. Manually verifying UI changes is time-consuming and error-prone, making automation a vital practice. In this guide, we’ll show how to use Kotest for capturing screenshots and Ktor for uploading them to a local server. This setup streamlines…
-

Writing reusable tests with Kotest’s Test Factory
TL;DR – How to use Kotest 4.0.0 new Test Factory feature to include reusable blocks of test in your test suite Hello, Kotliners! In this article we’ll see how to use a feature from the Kotest Framework to create reusable tests in your test suite, for cases in which you test multiple classes exactly the…
-
Testing Koin applications with Kotest
TL;DR – Using the KoinListener from Kotest to write tests that depend on Koin modules in a Kotest Spec Hello, Kotliners! In this article we will see how to test applications that use the Koin DI Framework in a Spec from the Kotest Framework. We’ll take the JUnit example from Koin’s documentation and enhance it…
-

Testing System Properties and System Environment with Kotest
TL;DR: Test code that uses System.getenv() or System.getProperty() with easy-to-use functions with Kotest Hello Kotliners! In this article we’ll discuss a little bit two features of Kotest: System Environment extensions System Property extensions They’re very similar on their implementation and use, and are very easy to use! The problem In the JVM world, some (many)…