https://kotlinlang.org logo
Title
l

LevT

01/21/2021, 12:09 PM
Sorry for me lacking deep motivation to learn Gradle at the moment I have JUnit5 working Please help me with
build.gradle.kts
for property testing with Kotest I'd prefer to try it in parallel (not technically said) with another recommended for Kotlin/JVM engine (jqwik? or any preferred over it) And I'm still having no sense of kotlin.test
Reviews are welcome
plugins {
kotlin("jvm") version "1.4.21"
id("io.kotest") version "0.2.6"
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
jcenter()
}
dependencies {
implementation("com.google.code.gson:gson:2.8.5")
testImplementation(platform("org.junit:junit-bom:5.7.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("io.kotest:kotest-assertions-core-jvm:4.3.2")
testImplementation("io.kotest:kotest-framework-engine-jvm:4.3.2")
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
How can I know if kotest is working here on itself or via junit5? I am curious about a real check, being aware of the word of the plugin documentation. And please help me adding another PTE (recommended in any opinionated sense)
s

sam

01/23/2021, 5:57 AM
I would avoid the kotest gradle plugin as that is experimental, and use the kotest/junit integration which you have added via the kotest-framework-engine-jvm dependeny.
l

LevT

01/23/2021, 7:07 AM
There is an official word in the docs that seems claiming the opposite "This is an alternative to using JUnit5 support and provides better output than the gradle default, especially for nested tests." https://github.com/kotest/kotest-gradle-plugin BTW, I need a kind of multitest build as a learning device, to get some fluency refactoring tests (between test frameworks) and to select the best framework up to my needs
If I disable the kotest-framework-engine-jvm dependency there is no more FunSpec еtс. What to be added instead?
Sorry I'm getting opposite advice right now, but still have no understanding how to manage builds, these ones that include kotest
s

sam

01/24/2021, 5:16 PM
Do you want a sample build that has kotest in it