In Play application.conf I have default values, %test, %stage and %prod values:
%stage.application.mode=prod
%prod.application.mode=prod
%test.application.mode=test
#default values
property=someValue
%test.property=testValue
%stage.property=stageValue
%prod.property=prodValue
I cannot change these because they’re used when the app is deployed to the respective environments.
However, I need to be able to start Play in test mode for unit testing on a local machine with different settings than what’s in %test.
Is there a way of adding another test config, say %unittest and start Play in test mode (play test) using these configs?
It actually works the other way around:
You define
%test-unit.application.mode=devImportant: The prefix has to be
test-and set values like
%test-unit.property=testValuefinally, you need to set the “id” of your Play server on the command line:
$ play idwhich, for this example would be
test-unit.Reference: http://www.playframework.org/documentation/1.2.5/guide11