We have a set of integration tests that we use to verify various things, including that our database is in a sane state per environment (Dev,Test,Qa,etc) in correlation to our JPA mappings and other data dependent items.
We configure which database, and other environment specific things we are connecting to via a Spring Profile. This works great on our automated build, where we set the environment variable "spring.profiles.active" to whatever environment we are in, run the integration tests, and easily locate configuration errors, and other things that can sometimes be overlooked.
However, what I would like, is the ability to set the spring.profiles.default attribute to "dev" in the integration test suite so that when a developer runs them from the IDE, they don't get errors complaining about the lack of a profile being set. We do this in the web.xml for a real deployment, but what I want to know is how can I hook into the AbstractTransactionalJUnit4SpringContextTests (or elsewhere) to accomplish this?