Posts

Testing Coroutines — Update 1.6.0

About one year ago I wrote some articles describing the Kotlin Coroutines Testing module. With the recent 1.6.0 release things changed significantly, so it’s time for an update. Read the article on medium...

Testing Coroutines — Dispatchers

In part one and two of this series we saw how to make use of the time control features of the kotlinx-coroutines-test module. In this part you will see how to test code that utilizes a dedicated dispatcher. Read the article on medium...

Testing Coroutines — Timeout

The first part of this series provided you an introduction to the building blocks of the kotlinx-coroutines-test module, and gave you some examples on eager execution and virtual time. In this second part we will have a look at testing timeouts. Read the article on medium .

Testing Coroutines — Introduction

This is the first part of my little series on testing coroutines, where we will explore the capabilities of the kotlinx-coroutines-test module. All examples (and some utility functions) are provided in a Git repository, so give it a try. This first part will introduce the building blocks of the module, and give some examples on eager execution and virtual time. Read the article on medium .

Getting Started With Kotlin-React

One of the hot topics of the KotlinConf 2017 keynote in San Francisco was multiplatform development with Kotlin, Kotlin/Native and Kotlin/JS. The latter has been demonstrated using the Kotlin wrappers for React, which allows you to write React apps using Kotlin. This sounds promising, since it allows you to write both (web-based) front- and backends using one language. In this three-part article on Medium I’d like to give an introduction to Kotlin-React.

JUnit 5 - Part II

Image
In the first part , I gave you a brief introduction to the basic functionality of the new JUnit 5 framework: new asserts, testing exceptions and timing, parameterizing and structuring tests. In this part I will explain the extension mechanism, which serves as a replacement for the runners and rules. The New Extension Model JUnit 4 introduced the concept of runners, which allowed you to implement a strategy on how to run a test. You could specify the runner to use by attaching the @RunWith annotation to the test class, where the value of the annotation specified the runner class to use. You could do quite a lot of stuff with runners, but they had one central drawback: you could specify only one runner on a test :-| Since this was not flexible enough for most people, they invented the concept of rules. Rules allows you to intercept the test execution, so you can do all kind of stuff here like test preparation and cleanup, but also conditionally executing a test. Additionally y