I wonder if now there's better support for viewing...
# gradle
d
I wonder if now there's better support for viewing test results from a gradle multi-module project in Intellij?
I keep on having to run those tests module-by-module...
I tried putting this in the root project:
Copy code
tasks.named<Test>("test") {
    useJUnitPlatform { }
    testLogging {
        showExceptions = true
        showStandardStreams = true
        exceptionFormat = FULL
    }
}
but it seems like it only runs one of my module's tests...
(I put the same thing in my
subprojects { }
block in the root too.)
c
If you run a test task in IntelliJ, it will show the test results for all modules in the same window
d
It doesn't for me... 😢
I'm wondering if I'm missing some configuration or something...
c
If you want to compare, it works for me on this project, there is run configuration called "Test" that runs all JS and JVM tests for all modules: https://gitlab.com/opensavvy/pedestal
You can clone it, check if it works for you with that project—if it does, you can figure out what you did differently, and if it doesn't I can help you find what's different with my setup
d
Thanks, I'll take a look!
Where is that Test configuration?
It's not in the root gradle file
c
Sorry for the delay. It's directly in the IntelliJ run configurations (top-right, the dropdown beside the run button). It should be called "test" or "all tests" or "check", I don't remember
Ah, it's called "All tests"
d
You defined that somewhere in Gradle?
c
d
Funny, I found it in the run gradle tasks dialog...
c
When you run it, you should see all test results for all projects in the IDEA window
d
Even in this dialog, there's something called allTests that I don't know where it's coming from...
c
It's from Gradle. It's created by the
kotlin("multiplatform")
plugin. If you use
kotlin("jvm")
or another variant it's probably just called
test
. You can run
./gradlew tasks
at the root of the project to find its name
d
That's exactly my problem, when I run that
test
gradle task on my root project, it only runs part of the tests, not all of them...
The funniest thing is that on the command line ./gradlew test runs them all...
c
Did you edit the
test
task in any way?
d
In the ide, no... I just used the gradle window to run test from...
It created the idea run task for me
Ok thanks! I tried creating that IDEA run cofiguration manually, and it works!
Boy, I had almost given up on multi-modules because of this!