Better assertion messages for your Kotlin tests
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


ShouldKO is tiny wrapper around assertion libraries to improve the error messages.

Build Status


Given standard hamcrest assertions:

assertThat("abcde".startsWith("aa"), equalTo(true))

you'll get:

Expected: <true>
     but: was <false>

However, ShouldKO improves on that:


will result in:

java.lang.AssertionError: "abcd".startsWith("aa") 
Expected: <true>
     but: was <false>

Installation Download

Register bintray maven repository:

repositories {
    maven {
        url  "" 

And add 'pl.miensol.shouldko:hamcrest' to your test implementation dependencies:

compile 'pl.miensol.shouldko:hamcrest:x.y.z'