Categoria: testing

  • Writing reusable tests with Kotest’s Test Factory

    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

    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)…