Lines Matching full:code
19 <li> Using <code>adb</code>, <code>am</code> and various logging functionality </li>
28 <p><code>am</code> is used to start and instrument activities using the adb shell command, as shown in the snippet below:</p>
45 <p>Each instrumentation test case is similar to an Android application with the distinction that it starts another application. For example, have a look in the <code>tests/Contacts</code> directory. </p>
48 <li> Tests are located in <code>tests/Contacts/src/com/google/android/contactstests</code>. </li>
49 <li> The Instrumentation Test Runner is located at <code>tests/Contacts/src/com/google/android/contactstests/functional/ContactsInstrumentationTestRunner.java</code>.</li>
51 <p>Suppose you have a makefile with <code>Contactstests</code> as the target. </p>
53 <li> <code>make Contactstests</code>: Compiles the test cases. </li>
54 <li> <code>adb install Contactstests.apk</code>: Installs the apk on the device. </li>
55 <li> Use the adb shell <code>am</code> command to run them. </li>
63 <p><code>Instrumentation.java</code> has helper functions that send key events and string, for example: </p>
65 <li><code>getInstrumentation()</code>: Returns the handle to the instrumentation </li>
66 <li><code>sendCharacterSync</code>: Sends a character. </li>
67 <li><code>sendStringSync</code>: Sends a string to an input box. </li>
68 <li><code>sendKeyDownUpSync</code>: Sends a specific keyevent. </li>
69 <li><code>sendTrackballEventSync</code>: Send a trackball event.</li>
71 <p> You can find the test case below at <code>device/tests/Contacts.</code></p>
134 <p>If you run your test cases and nothing appears to happen, have a look at <code>adb logcat</code>. The following is a common problem:</p>