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

phil-t

02/23/2024, 11:06 AM
Hi all, I'm having a problem with the Kotest IntelliJ plugin where the green play buttons aren't displaying next to the tests. Are there any options in IntelliJ I would need to change for this to work? This is after getting a new Macbook, and it worked on the old Macbook so I don't know what would have changed to cause this problem with the plugin
Looking at a couple of projects with Kotest tests, the ones where the play buttons are not appearing are using StringSpec and BehaviorSpec, but in another project which uses DescribeSpec the play buttons appear and the tests run correctly 🤔
k

Klitos Kyriacou

02/23/2024, 11:48 AM
I have this problem with tests that are not in the "test" directory (i.e. they are in "integrationTests" etc.) Then I have to tell IntelliJ IDEA that this directory is a test sources root. Unfortunately, I have to do this every time I update my Gradle build file or change branches, which is annoying. Is this what the issue is for you?
p

phil-t

02/23/2024, 12:04 PM
The tests are under the test directory but I think this could be related to the way the folders / modules are set in each project
This is what it looks like in the project where the play buttons are working:
And this is what it looks like in the projects where the play buttons aren't displayed:
k

Klitos Kyriacou

02/23/2024, 12:26 PM
So test/kotlin is incorrectly marked as "sources root" instead of "test sources root". It's probably not a Kotest-related issue, but an IntelliJ IDEA or Gradle issue.
1
gratitude thank you 1
p

phil-t

02/23/2024, 2:24 PM
Yeah it looks like there's a problem with the project structure settings so I'll look into that
2 Views