title: How to access XML file when running a Junit with association of property file?
body: <p>I am developing a spring + maven project. And in some classes I am reading XML file in my project. Path for the XML is on properties file. But it will take the path from the Catalina base. Its working fine. But when I need to execute the test case, I can not get the correct path because it will depend on Catalina base.So how can I access my XML file when Junit running?</p>
  
  <p>My properties file</p>
  
  <pre><code> projecthieararchy.read.derectory=/webapps/phdash/WEB-INF/config/Programs.xml
  </code></pre>
  
  <p>XML is reading from various .java files So I need to get the class path combination to the properties file. </p>
  
  <p>ie. 
  Test files located like this</p>
  
  <p><strong>1. Framework --> src --> test --> delegate--> Test1.java</strong></p>
  
  <p><strong>2. Framework --> src --> test --> delegate--> somefolder ---> Test2.java</strong></p>
  
  <p>I can a add copy of XML to test like,
  XML can be located</p>
  
  <p><strong>Framework --> resources ---> Programs.xml</strong></p>
  
  <p>How to add the test file path in property file?? </p>
  
  <p>Thanks.</p>