Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I run android unit tests/functional tests?
    text
    copied!<p>Following the "<a href="http://developer.android.com/resources/tutorials/hello-world.html" rel="nofollow noreferrer">Hello, World</a>" and "<a href="http://developer.android.com/resources/tutorials/testing/helloandroid_test.html" rel="nofollow noreferrer">Hello, Testing</a>" tutorials I created an android application created with Eclipse, along with a corresponding Android Test Project. </p> <p>The tests run fine... once. After that, in order for me to run the tests again, I have to close the emulator. </p> <p>If I don't close the emulator, the Eclipse console get stuck on "Installing instrumentation android.test.InstrumentationTestRunner on device emulator-5554"... Nothing happens after that.</p> <p>Here's the output from my program on the second run:</p> <pre><code>[HelloTest] ------------------------------ [HelloTest] Android Launch! [HelloTest] adb is running normally. [HelloTest] Performing android.test.InstrumentationTestRunner JUnit launch [HelloTest] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'FakePhone' [HelloTest] Uploading HelloTest.apk onto device 'emulator-5554' [HelloTest] Installing HelloTest.apk... [HelloTest] Success! [HelloTest] Project dependency found, installing: Hello [Hello] Application already deployed. No need to reinstall. [HelloTest] Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5554 </code></pre> <p>As you can see it stops at "Launching Instrumentation"... I've also run "adb logcat" and not seen anything interesting. </p> <p>I've been told to exit out of the application under test in the emulator in order to run the test again. Unfortunately the emulator doesn't have the app pulled up (it's in the normal "locked" position and when unlocked brings up the home screen) and even if I do pull it up then exit, it doesn't seem to let me run my tests again.</p> <p>All the example videos and tutorials all stop at the first run of a test. I have yet to see anyone anywhere run a test a second time! </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload