title: Adding test files to a Junit test in Netbeans 6.7.1 - getResource issues, missing file in build directory
body: <p>I'm adding a Junit test to one of my classes using NetBeans 6.7.1, I need to be able to load a an xml file specific to testing, so I've included it in the "Test Packages" folder (along with my actual test). I'm running into 2 issues, </p>
  
  <p>(1) getResource is looking in the wrong directory</p>
  
  <p>(2) my xml test file doesn't get copied when I run tests (note, this functionality works with I add files to the "Sources Packages" directory). </p>
  
  <p>In my test class:</p>
  
  <blockquote>
    <p>this.getClass().getResource("/")</p>
  </blockquote>
  
  <p>returns:</p>
  
  <p>D:\UserProfiles\myName\My Documents\NetBeansProjects\ProjectExample\build\classes</p>
  
  <p>I need it too return:</p>
  
  <p>D:\UserProfiles\myName\My Documents\NetBeansProjects\ProjectExample\build\test\classes</p>
  
  <p>(As that is where the test classes are being compiled)</p>
  
  <p>It seems rather hacky calling getResource, getting the parent, and then looking in test\classes. Is this the proper way of getting the path to my test file ? maybe this is a bug in netbeans ?</p>
  
  <p>Also, when I right click on my testFile and "run tests" , only my test class files get copied to the test/classes directory and not my xml test file.  How do I tell Netbeans to make sure to copy a regular xml file along with class files to the build directory. </p>
  
  <p>I would also like to avoid hacking the ant build to copy my test files. </p>