-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
wontfixThis will not be worked onThis will not be worked on
Description
I have a custom integrationTest
compilation in KMP project and a JVM target. I’ve got some tests in jvmIntegrationTest
source set. When trying to run these tests from IDE using Kotest plugin, it runs cleanJvmTest
and jvmTest
tasks, I would expect it to run cleanJvmIntegrationTest
and jvmIntegrationTest
tasks.
Is it something that Kotest plugin need to somehow pick up on, or are there additional steps I need to take when configuring my compilation?
Here's how I configure integrationTest
compilation for my JVM target:
jvm {
val integrationTest by compilations.creating {
val main by compilations.getting
associateWith(main)
defaultSourceSet {
dependencies {
// Compile against the main compilation's compile classpath and outputs:
implementation(main.compileDependencyFiles + main.output.classesDirs)
implementation(kotlin("test-junit"))
}
}
// Define a Gradle task to run the integration tests
project.tasks.register<Test>("jvmIntegrationTest") {
description = "Run JVM integration tests"
group = VERIFICATION_GROUP
classpath = compileDependencyFiles + runtimeDependencyFiles + output.allOutputs
testClassesDirs = output.classesDirs
}
}
}
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on
Activity
kirillzh commentedon Sep 19, 2023
This is where plugin looks for JVM test tasks:
kotest-intellij-plugin/src/main/kotlin/io/kotest/plugin/intellij/toolwindow/treeModel.kt
Line 59 in 8b7fdab
What would be the most sensible approach here to make it pick up test tasks from other compilations?
kirillzh commentedon Sep 19, 2023
As a workaround, created this task that automatically generates a run configuration for each integration test file:
sksamuel commentedon Oct 2, 2023
We need a way to determine if a module is a test module or not, programatically, rather than using the string names.
stale commentedon Apr 26, 2025
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.