How could I run the test tasks in all the subproje...
# gradle
d
How could I run the test tasks in all the subprojects hierarchy from the root project (preferrably in a way Intellij could display the results...)?
e
to run all tests across multiple subprojects and see their results: https://docs.gradle.org/current/userguide/test_report_aggregation_plugin.html I don't think intellij understands it though
d
Oh... I'm surprised that Intellij wouldn't have such a feature... but thanks for the gradle technique at least... just less pleasant than having IDE support...
s
You can make a Gradle run configuration in IDEA that will do this. Just enter
test
as the command to run, and set the “Gradle project” field to the root project. When you invoke Gradle with a task name, it uses name-matching execution, so it will execute all the tasks named
test
in the given project and all of its subprojects. IntelliJ is smart enough to pick up all the results and display the combined results in the ‘Run’ window.
v
You can also simply make a test run configuration in IntelliJ where you tell it to run all tests in the project and IntelliJ will care about the rest.