https://kotlinlang.org logo
#kotest
Title
# kotest
m

Matt

07/22/2021, 1:51 PM
Hi all, I have the kotest intellij plugin (https://github.com/kotest/kotest-intellij-plugin) installed but when I right click on the root of my project and run all the tests, they are run via Gradle rather than the kotest plugin. Have I missed a step to enable this?
If I set "Run test using" to "Intellij IDEA" then I get a error "Error running 'All in my-app': No junit.jar"
s

sam

07/22/2021, 2:15 PM
Is this a jvm project
m

Matt

07/22/2021, 2:17 PM
It is
Using kotest 4.6.1
s

sam

07/22/2021, 2:17 PM
Does it work when you run a single test file from the green arrow
m

Matt

07/22/2021, 2:18 PM
Yes, it uses the kotest plugin when I run test from gutter icon
s

sam

07/22/2021, 2:19 PM
Ok so you're talking about right clicking on the package list on the left
m

Matt

07/22/2021, 2:19 PM
Yes
s

sam

07/22/2021, 2:20 PM
That sounds like a bug in the plugin for sure.
m

Matt

07/22/2021, 2:21 PM
Actually, the gutter icon only works if I run a single test. If I use the gutter icon on the class it uses Gradle.
s

sam

07/22/2021, 2:21 PM
That will change if you set the runner to idea in the settings
m

Matt

07/22/2021, 2:22 PM
Yes, you're right.
If I right click and run all tests on test folder it seems to use junit
Right clicking on test/kotlin runs all the tests
At least that allows me to generate a run config
l

LeoColman

07/22/2021, 3:17 PM
I don't think it's a bug. Try to see the following:
File | Settings | Build, Execution, Deployment | Build Tools | Gradle
"Run tests using ..."
Maybe your config is set to gradle only
Oh, I see you've set it to "Using IntelliJ", sorry
4 Views