I’m trying to upgrade from Gradle 2.11 to 3.1 and one thing I noticed is that my JUnit test result XML files are ending up one level deeper in the build tree than they were before. Instead of being in .../test-results/*.xml they’re now in .../test-results/test/*.xml. The part of the path that ends at test-results seems to be configurable using the testResultsDirName property. But I can’t see where the final test pathname component is coming from or whether it can be configured.
I have a bunch of machinery that I’d rather not have to change and that’s assuming the XML files are directly in .../test-results, not a subdirectory.
The “test” path component comes from the task name that creates it. In your case, it is “test”. We hit the same change and we have integration tests run by our own test task called integTest and the XML files are now in “test-results/integTest”. In our case, this change makes sense because before the same test name in test and integTest could overwrite each other. But I don’t know if it could be overwritten.
One quick solution could be to add a finalize step for test that moves these folders back to test-results.