Running a video from test case in android
<p>I am running a test case using AndroidTestCase class in eclipse. I want to run a video through this test case . </p>

<pre><code> MediaPlayer mediaPlayer = new MediaPlayer();
 mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
        try {

            file = Environment.getExternalStorageDirectory();
            Log.v("tarun", file.getPath());
            mediaPlayer.setDataSource(getContext(),
                    Uri.parse(file.getPath() + "/DCIM/Camera/arun.mp4"));
            mediaPlayer.setAIAContext(false);
            mediaPlayer.prepare();
        } 
catch (Exception e) {
            fail("Failed due to I/O exception");
        }
        mediaPlayer.start();

 Thread.sleep(5000);
</code></pre>

<p>Now when the test case runs only sound is coming no video is displayed, but I want to show a video here for a specified time. I just know that I need a videoview here but I am not able to implement it. So please give me some direction here.</p>

<p>Thanks</p>
