Skip to content

[question] Gradle test suites support? #367

@kkocel

Description

@kkocel

I wonder if plugin supports Gradle testing suites? I have tests defined as follows:

testing {
    suites {
        withType<JvmTestSuite> {
            useJUnitJupiter()
            dependencies {
                implementation(project())
                implementation(libs.springBootStarterTest)
                implementation(libs.kotestAssertions)
            }
        }

        val test by getting(JvmTestSuite::class) {
            testType = TestSuiteType.UNIT_TEST
            useJUnitJupiter()
            dependencies {
                implementation(libs.kotestAssertions)
            }
            sources {
                kotlin {
                    setSrcDirs(listOf("src/test/kotlin"))
                }
            }
        }

        val integrationTest by registering(JvmTestSuite::class) {
            testType = TestSuiteType.INTEGRATION_TEST
            dependencies {
                implementation(libs.springBootDevtools)
                implementation(libs.springBootTestcontainers)
                implementation(libs.testcontainersJupiter)
                implementation(libs.testcontainersMongodb)
                implementation(libs.testcontainersRedis)
            }
            sources {
                kotlin {
                    setSrcDirs(listOf("src/integrationTest/kotlin"))
                }
            }
        }

        val acceptanceTest by registering(JvmTestSuite::class) {
            testType = TestSuiteType.FUNCTIONAL_TEST
            dependencies {
                implementation(libs.springBootDevtools)
            }
            sources {
                kotlin {
                    setSrcDirs(listOf("src/acceptanceTest/kotlin"))
                }
            }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions