Usually you don't have a Spring context in the JUnit tests. I would like to have placeholders which can be defined programmatically. Like you define in the yaml file: apiExecutor[0].outputDir: ${file.path} And define the value for the Idaithalam executor like in a Hashmap: VirtualanTestPlanExecutor.setValues(HashMap map); That will help a lot if you have several configuration files containing same values. I can make a PR for that if that is ok.