Hey folks :wave: Running into a couple of issues w...
# kotest
j
Hey folks πŸ‘‹ Running into a couple of issues with the Kotest IntelliJ plugin in a Gradle composite build (mono repo, multiple included builds): 1. Gutter icons ignore Gradle wrapper path Running tests from the Kotest tool window works fine β€” picks up the correct Gradle home (project root wrapper). But gutter icons always set the working directory to the module root instead of the project root. I've tried updating the run configuration template to point to the project root, but gutter-generated configs don't inherit it β€” they revert to the module. 2. Environment variables don't persist Running via
./gradlew test
on the CLI, env vars work as expected. But tests launched from gutter icons or the tool window don't carry over env vars. Setting them in the run config template also doesn't propagate to newly created run configs from either location. Is there a setting I'm missing, or is this a known limitation with composite builds? Any pointers appreciated πŸ™
a
Hello πŸ‘‹ for 1, I'll need some time to replicate it, unless you have anything to provide us ready to play with
For 2, I assume you mean that when you open the config and add some vars they are ignored as soon as you click run? I guess we can look into this, but for now, if you were to save the config as a new config and run it, you should be able to apply your vars.
For 1: I may have gotten this wrong, but is this a fair representation of your setup? https://github.com/kotest/kotest-examples/tree/master/kotest-multi-module
j
@Alfonso Ristorato first off thanks for looking into this β€” much appreciate!! To answer your questions: For running test using the gutter icons - I have tried persisting the configurations in the IntelliJ IDE and storing them as a part of the project file but to no avail as each click of the gutter icon β€” launches a new innovation of the grade task for that particular test β€” I would have thought the gutter would lunch the Kotest configuration itself β€” but it does not For the shape of my project β€” it tends to follow the gradle composition build example https://docs.gradle.org/current/samples/sample_composite_builds_basics.html
❀️ 2
a
ah wow, this composite build is so far away from my old knowledge of building gradle modules πŸ™‚ I will have to look into it to replicate.
As for the configuration, what I am trying to understand is whether this could work. β€’ take one test β€’ click modify configuration β€’ add your changes (var change or anything else) and give it a name - first screenshot β€’ now if you click ok and run with the gutter it will not work (as you established) - but it should also get saved in the
recent configuration
menu (top right of IJ) - where your changes should have been persisted - second screenshot Does that work as an interim solution while we figure it out?
j
Ah yes β€” saving the configuration and running it directly does hold the various configuration items
πŸ‘ 1
a
Cool thanks, let's see what we can do πŸ˜ƒ
hey there, I know quite late - but this has now been fixed with version 6.1.24