Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Gradle test suites support? #367

Open
kkocel opened this issue Oct 25, 2024 · 2 comments
Open

[question] Gradle test suites support? #367

kkocel opened this issue Oct 25, 2024 · 2 comments
Labels

Comments

@kkocel
Copy link

kkocel commented Oct 25, 2024

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"))
                }
            }
        }
    }
}
@szpak
Copy link
Owner

szpak commented Nov 1, 2024

That's a good question. Gradle internally used by GPP (6.9.2) is "quite old" (due to the legacy CD mechanism used by the project).

Could you give it a try and paste your results (e.g. produced errors)?

@szpak szpak added the question label Nov 1, 2024
@kkocel
Copy link
Author

kkocel commented Nov 7, 2024

@szpak I managed to put some non working example - https://github.com/kkocel/mutation-testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants