I've got a Java Spring boot service that contains several modules.
When I do mvn test in the root folder of the project I see about 400 tests running and all of them are OK.
Then in Intellij I make right click on my module and select Run All Tests menu item. In this case 70% of tests start to fail. If I run a single test in Intellij by clicking a green triangle in front of the test it fails as well.
The problem seems to be some missing configuration or something like this.
If I create a maven run configuration in Intellij with clean install command or if I run maven test phase in the menu of Intellij I see that all tests are ok.
What may be the difference between mvn test in command line and running test in Intellij that makes maven's tests pass and Intellij's fails?