I am trying to aggregate the test results from multiple projects, however I only want to aggregate for those projects in which the test results exist.
The current behavior of the test-report-aggregation causes all projects to execute the test task for all modules; however, I’d like to only aggregate the reports which already exist (as one or more of the modules may have not been executed).
I would expect to see the tests which have been run reporting as NO-SOURCE, however they are always being executed when the results are missing.
I don’t think this is possible built-in.
Especially as this would also cause stale reports to be aggregated that are long out-of-date potentially.
The aggregate task defines it needs the reports, the reports define they are produced by the test tasks, so the test tasks are run.
If you really want the dangerous and flaky logic you described, you probably need to set it up yourself without using the built-in plugin.
You would basically do the same the plugin is doing, just with only configuring the report files as outgoing artifact without the task dependency.
If you really want the dangerous and flaky logic you described, you probably need to set it up yourself without using the built-in plugin.
@Vampire The project(s) themselves will be run from a fresh image from CI each time (depending on which integration test scenarios are selected). Would this really be considered “dangerous and flaky”? The potential for stale reports wouldn’t exist as the image is cleaned/reinitialized each build.
Maybe you could try to first run your tests and then in a separate execution run the aggregation task and also have -x test to suppress running test tasks and their sole dependencies.
This might maybe give the result you intend, but you have to try it, that’s just a guess.