is there a way to have functional tests stopping a...
# plugin-development
g
is there a way to have functional tests stopping at breakpoints when executing them in debug mode?
s
As in TestKit tests?
g
what do you mean?
s
Well, what do YOU mean? 😄
TestKit is the way most plugin integration testing is done
This is a discussion about plugin development. Hence I assume that is what you mean
g
I'm expanding the template
Copy code
val projectDir = File("build/functionalTest")
        projectDir.mkdirs()
        projectDir.resolve("settings.gradle.kts").writeText("..")
        projectDir.resolve("build.gradle.kts").writeText("..")
        // Run the build
        val runner = GradleRunner.create()
        runner.forwardOutput()
        runner.withPluginClasspath()
        runner.withArguments("generateTerraform")
        runner.withProjectDir(projectDir)
        val result = runner.build()
s
Yes, GradleRunner is from TestKit
Dunno, breakpoints always JustWork for me
g
ah, I didn't know that
s
You must have something like
testImplementation gradleTestKit()
unless the plugin plugin applies it automatically, but i do not believe so
anyway, sorru i cannot help as breakpoints always just work for me. though i use Java based testing
g
unfortunately
testImplementation(gradleTestKit())
didn't work just to be double sure, you simply execute the test via the Idea gui (column on top left) choosing the debug option and that is?
s
Yes. In fact I can even set breakpoints in the build script
Dunno, like I said you use a different approach for testng (Groovy it seems) whereas I use Java. And I assume you then use Groovy for implementing the plugin (which is not the recommendation as far as I understood). So that may all factor into it
g
no, all kotlin, src and script code
s
I'll step away from trying to help as you have a very different set up
g
thanks anyway for trying, Steve
s
Hopefully someone else can step in
👍 1
g
awesome,
withDebug(true)
works as a charm, thanks!