I am looking for a solution to automatically add the environment variable SPRING_PROFILES_ACTIVE="test" when running unit-tests. The solution should fulfill the following criteria :
- Ideally it should be configured via maven pom.xml
- If 1 is not possible configuration should be done for IntelliJ via configuration file in the project not via UI setting
- The particular environment variable should only be set when running unit tests not when generally launching the app.
Any idea on how to approach this goal is appreciated.
Best Andy