How to run all tests in all modules in a folder subtree.
In my project I have a lot of separate modules, each is a Maven project.
I don't have a parent POM.
Most of these Maven projects contain TestNG tests.
These Maven projects are organized in a folder tree, and this tree is beautifully reflected in the Project view, which is important for me.
From inside IntelliJ I would like to be able to automatically run all the tests of all the modules that are under one of these subfolders of the folder tree. The subfolder does not directly contain a module, it contains further subfolders which either contain a module each or contain more subfolders.
I right-click on one of these subfolders and look in the menu for an option like "Run all tests under this subtree" but I don't see anything along these lines.
Is what I'm trying to achieve possible from inside IntelliJ ? Maybe through a plugin ?
For context, I did create a PowerShell script that retrieves all modules under a given subtree and invokes 'mvn test' for all of them, but this has several disadvantages over being able to run the tests from inside IntelliJ, the biggest one being that from inside IntelliJ the tests would run using the actual source code of the dependencies rather than the already compiled versions of the dependencies that it finds in the local Maven repo.
Please sign in to leave a comment.