title: Not able to access Xml file when code is executed using Junit
body: <p>I am working on <strong>"robotium with junit"</strong>.
  I have come across the situation where, my code is not able to find the <strong>Xml file</strong> on the given path.(Provided that the specified path is correct). </p>
  
  <p><strong>If I run the same code(file reading) with normal java then its working fine.</strong></p>
  
  <p>But when i run the code with <strong>junit</strong>, code cannot find the specified Xml file.</p>
  
  <p>Here is my code: <strong>Refer public void test_insert();</strong></p>
  
  <pre><code>import java.io.File;
  import java.io.IOException;
  
  
  
  import com.robotium.solo.Solo;
  import com.rohit.databse_crud.DbReader;
  import com.rohit.databse_crud.insert_act;
  
  import android.test.ActivityInstrumentationTestCase2;
  import android.util.Log;
  
  @SuppressWarnings("unchecked")
  public class InitialButtonTest extends ActivityInstrumentationTestCase2 {
  
  private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME = "com.xyz.dat.SplashActivity";
  private static Class launcherActivityClass;
  static {
  
      try {
          launcherActivityClass = Class
                  .forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
      } catch (ClassNotFoundException e) {
          throw new RuntimeException(e);
      }
  }
  
  public InitialButtonTest() throws ClassNotFoundException {
      super(launcherActivityClass);
  }
  
  private Solo solo;
  
  @Override
  protected void setUp() throws Exception {
      solo = new Solo(getInstrumentation(), getActivity());
  }
  
  public void test_insert()
  {
      String name="C:/Users/Marathe/x.xml";
      File xmll=new File(name);
      if(xmll.exists())
      {
          System.out.println("file found");
      }
      else
      {
          System.out.println("file not found");
      }
  }
  </code></pre>
  
  <p><strong>Here is the simple Java code which works fine for me:</strong></p>
  
  <pre><code>import java.io.File;
  public class TestFile {
  
  /**
   * @param args
   */
  public static void main(String[] args) {
      // TODO Auto-generated method stub
  
      String name="C:/Users/Marathe/x.xml";
      File xmll=new File(name);
      if(xmll.exists())
      {
          System.out.println("file found");
      }
      else
      System.out.println("file not found");
    }
  
  } 
  
  O/P : file found
  </code></pre>
  
  <p>Though i am having the xml file with me on the specified path, I am getting "file not found" message from else.</p>
  
  <p>Is there any other way in junit, to access the file ? </p>
  
  <p>Please help me to solve this issue. Where exaclty i am going wrong ?</p>
  
  <p>Thanks in advance.</p>