Play Framework, as of version 2.3.x, typically loads the configuration for your application from
conf/application.conf. Although it works as expected, it doesn’t allow for different configurations to be used in different environments unless the file is replaced. This is specially inconvenient when running tests directly from Activator since these tests will be executed against the same database used for running the application in development mode.
First create a configuration file, say
conf/application.test.conf, for the Test mode. This file will inherit all settings defined in the main configuration file through the
include statement, but will also override the values that should be different when running tests.
Then, configure SBT to instruct Play to load this file when running in Test mode by adding the line below to your
This should be enough.