setting -Dspring.profiles.active for test cases

Answered

Hello

I currently have application-dev.properties, application-prod.properties, application-qa.properties files in the spring boot project.

 To run the app, I can use the 

-Dspring.profiles.active=prod

for example.

 

But the test cases are failing unless I go to each test file and set VM option to -Dspring.profiles.active=production.

Is there a way to set the VM option fro all test files in the test folder, at once?

Thanks

1
1 comment

Edit the defaults for the run/debug configuration that you are using for the tests.

https://www.jetbrains.com/help/idea/2016.3/changing-run-debug-configuration-defaults.html

0

Please sign in to leave a comment.