The first step is to add the required dependencies to our project. The kotlin-test library provides annotations and base implementations for tests and assertions. Let's go to the build.gradle file and append the lines in bold:
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
// Test libraries
testCompile "org.jetbrains.kotlin:kotlin-test"
testCompile "org.jetbrains.kotlin:kotlin-test-junit"
}
Once the changes are applied, we will be able to start writing our Functional Tests.
We are using the standard testing library for Kotlin because I don't want the book to include third-party libraries unless needed. But be aware that there are other testing frameworks for Kotlin that may have features that adjust better to your project.