Albilaga
07/14/2025, 6:54 AMkotest M5
? I am following this now https://github.com/JesusMcCloud/KMPotest/blob/main/shared/build.gradle.kts#L10-L16 but when try using ./gradlew test
then I only get information like this
package.extensions.DoubleExtensionsTest > should format numbers into abbreviated form FAILED
io.kotest.assertions.AssertionFailedError at DoubleExtensionsTest.kt:9
is this expected? I also try to run individual using kotest plugin in intellij but get error
Cannot locate tasks that match ':iosSimulatorArm64Kotest' as task 'iosSimulatorArm64Kotest' not found in root project 'PostMobile'.
and I am tried this as well https://github.com/kotest/kotest/issues/4936#issuecomment-3067960857 but not working as well. I maybe missing something?Bernd Prünster
07/14/2025, 6:58 AMAlbilaga
07/14/2025, 7:02 AMcommonTest.dependencies {
implementation(libs.kotest.assertions.core)
implementation(libs.kotest.framework.engine)
implementation(libs.kotest.property)
implementation(libs.turbine)
implementation(libs.kotlinx.coroutines.test)
}
androidMain.dependencies {
implementation(libs.ktor.client.okhttp)
implementation(libs.grpc.okhttp)
}
iosMain.dependencies {
implementation(libs.ktor.client.darwin)
}
androidUnitTest {
dependencies {
implementation(libs.kotest.runner.junit5)
implementation(libs.kotest.assertions.core)
implementation(libs.kotest.framework.engine)
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
finalizedBy(tasks.named(jacocoTestReport))
}
}
or I just need to move all kotest in commonTest.dependencies
to androidUnitTest.dependencies
?Bernd Prünster
07/14/2025, 7:02 AMBernd Prünster
07/14/2025, 7:02 AMAlbilaga
07/14/2025, 7:06 AMandroidUnitTest.dependencies
like that but now not really sure how to force it to run jvm onlyBernd Prünster
07/14/2025, 7:08 AMkotest-framework-api
is not a thing anymoreBernd Prünster
07/14/2025, 7:09 AMAlbilaga
07/14/2025, 7:31 AMAlbilaga
07/14/2025, 7:33 AMpackage.extensions.DoubleExtensionsTest > should format numbers into abbreviated form FAILED
io.kotest.assertions.AssertionFailedError at DoubleExtensionsTest.kt:9
Albilaga
07/14/2025, 8:09 AMBernd Prünster
07/14/2025, 8:25 AMAlbilaga
07/14/2025, 8:29 AMcommonTest
folder. And I run ./gradlew check
in root project but the error is just
package.extensions.DoubleExtensionsTest > should format numbers into abbreviated form FAILED
io.kotest.assertions.AssertionFailedError at DoubleExtensionsTest.kt:9
iirc, usually it should have something like also print expected and actual value?Bernd Prünster
07/14/2025, 8:30 AMandroidJvmMain
combined android and JVM sources
• jvmMain
jvm-only (non-android)
• androidMain
Android onlyBernd Prünster
07/14/2025, 8:32 AMBernd Prünster
07/14/2025, 8:35 AMAlbilaga
07/14/2025, 8:36 AMandroidMain
as Android only and also actual class from commonMain
• iosMain
as iOS only and also actual class from commonMain
• commonMain
shared logic between android and iOS
• commonTest
unit tests for testing logic in commonMain
.
commonTest
is usually the one that we wrote unit test. For unit test we usually just run ./gradlew test
to make sure it pass.Bernd Prünster
07/14/2025, 8:37 AMAlbilaga
07/14/2025, 8:43 AMfailed
without printing expected and actual?Bernd Prünster
07/14/2025, 8:46 AMAlbilaga
07/14/2025, 8:53 AM