In order to run my unit tests on my Eclipse, I need to set some properties for the VM.
Thus, when I first run my JUnit test, I go in \"Open Run Dialog\", then in my JUni
I never understood why the launch configurations have a way to define environment variables but the only way of adding a system property seems to be to add vm arguments.
The way I've worked around this is to have tests (or an abstract tests base class) test for the presence of required properties, if they aren't there then I load them from a .properties file on the classpath.
This works as I can still override them or specify them from ANT or Maven but can also 'right click' -> Run As -> Junit Test the individual test files.
edit: here is an example of getting Spring to optionally load a properties file in the same manner as described above: