diff --git a/docs/html/guide/developing/testing/testing_eclipse.jd b/docs/html/guide/developing/testing/testing_eclipse.jd index 3258af9b4306a..ba7eabafdc47f 100644 --- a/docs/html/guide/developing/testing/testing_eclipse.jd +++ b/docs/html/guide/developing/testing/testing_eclipse.jd @@ -304,6 +304,7 @@ page.title=Testing In Eclipse, with ADT Android Emulator. +
The progress of your test appears in the Console view as a series of messages. Each message is
- preceded by a timestamp and the Android package name to which it applies.
+ preceded by a timestamp and the .apk filename to which it applies. For example,
+ this message appears when you run a test to the emulator, and the emulator is not yet started:
+
+ The examples shown in this section come from the + SpinnerTest + sample test package, which tests the + Spinner + sample application. This test package is also featured in the + Activity Testing + tutorial. +
+
+ [yyyy-mm-dd hh:mm:ss - testfile] Waiting for HOME ('android.process.acore') to be launched...
+
+
In the following description of these messages, devicename is the name of
the device or emulator you are using to run the test, and port is the
port number for the device. The name and port number are in the format used by the
adb devices
- command. Also, testpackage is the name of the test package you are
- running, and app_package is the label for the application under test.
+ command. Also, testfile is the .apk filename of the test
+ package you are running, and appfile is the filename of the application under test.
- Uploading testpackage onto device 'devicename-port'
+ Uploading testfile onto device 'devicename-port'
- then the message Installing testpackage.
+ then the message Installing testfile.
and finally the message Success!
+ The following lines are an example of this message sequence: +
+
+[2010-07-01 12:44:40 - MyTest] HOME is up on device 'emulator-5554'
+[2010-07-01 12:44:40 - MyTest] Uploading MyTest.apk onto device 'emulator-5554'
+[2010-07-01 12:44:40 - MyTest] Installing MyTest.apk...
+[2010-07-01 12:44:49 - MyTest] Success!
+
+
- Project dependency found, installing: app_package
+ Project dependency found, installing: appfile
- then the message Uploading app_name.apk onto device
+ then the message Uploading appfile onto device
'devicename-port'
- then the message Installing app_name.apk
+ then the message Installing appfile
and finally the message Success!
+ The following lines are an example of this message sequence: +
+
+[2010-07-01 12:44:49 - MyTest] Project dependency found, installing: MyApp
+[2010-07-01 12:44:49 - MyApp] Uploading MyApp.apk onto device 'emulator-5554'
+[2010-07-01 12:44:49 - MyApp] Installing MyApp.apk...
+[2010-07-01 12:44:54 - MyApp] Success!
+
+Launching instrumentation instrumentation_class on device
@@ -411,6 +456,17 @@ page.title=Testing In Eclipse, with ADT
This indicates that your tests are finished.
+ The following lines are an example of this message sequence: +
+
+[2010-01-01 12:45:02 - MyTest] Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5554
+[2010-01-01 12:45:02 - MyTest] Collecting test information
+[2010-01-01 12:45:02 - MyTest] Sending test information to Eclipse
+[2010-01-01 12:45:02 - MyTest] Running tests...
+[2010-01-01 12:45:22 - MyTest] Test run complete
+
+The test results appear in the JUnit view. This is divided into an upper summary pane, and a lower stack trace pane. @@ -448,9 +504,31 @@ page.title=Testing In Eclipse, with ADT If you double-click the method name, Eclipse opens the test class source in an editor view pane and moves the focus to the first line of the test method.
++ The results of a successful test are shown in + Figure 1. Messages for a successful test: +
+ +
+
++ Figure 1. Messages for a successful test +
The lower pane is for stack traces. If you highlight a failed test in the upper pane, the lower pane contains a stack trace for the test. If a line corresponds to a point in your test code, you can double-click it to display the code in an editor view pane, with the line highlighted. For a successful test, the lower pane is empty.
++ The results of a failed test are shown in + Figure 2. Messages for a test failure +
+ +
+
++ Figure 2. Messages for a test failure +
diff --git a/docs/html/images/testing/eclipse_test_results.png b/docs/html/images/testing/eclipse_test_results.png new file mode 100644 index 0000000000000..105e149e8af9e Binary files /dev/null and b/docs/html/images/testing/eclipse_test_results.png differ diff --git a/docs/html/images/testing/eclipse_test_run_failure.png b/docs/html/images/testing/eclipse_test_run_failure.png new file mode 100644 index 0000000000000..81111273184e4 Binary files /dev/null and b/docs/html/images/testing/eclipse_test_run_failure.png differ