The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- Copyright (C) 2009 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 7 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 9 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 17 | <!-- |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 18 | This file contains standard test definitions for the Android platform |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 19 | |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 20 | Java tests are defined by <test> tags and native ones (C/C++) are defined by |
| 21 | <test-native> tags. |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 22 | |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 23 | JAVA/application tests: |
| 24 | ======================= |
| 25 | The java <test> element has the following attributes |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 26 | |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 27 | name package [class runner build_path coverage_target continuous description] |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 28 | |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 29 | Where: |
| 30 | name: Self-descriptive name used to uniquely identify the test |
| 31 | build_path: File system path, relative to Android build root, to this |
| 32 | package's Android.mk file. If omitted, build/sync step for this test will |
| 33 | be skipped. |
| 34 | package: Android application package that contains the tests |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 35 | class: Optional. Fully qualified Java test class to run. |
| 36 | runner: Fully qualified InstrumentationTestRunner to execute. If omitted, |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 37 | will default to android.test.InstrumentationTestRunner. |
| 38 | coverage_target: Build name of Android package this test targets - these |
| 39 | targets are defined in the coverage_targets.xml file. Used as basis for |
| 40 | code coverage metrics. If omitted, code coverage will not be supported for |
| 41 | this test. |
| 42 | continuous: Optional boolean. Default is false. Set to true if tests are known |
| 43 | to be reliable, and should be included in a continuous test system. false if |
| 44 | they are under development. |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 45 | |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 46 | description: Optional string. Default is empty. Short description (typically |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 47 | less than 60 characters) about this test. |
| 48 | |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 49 | These attributes map to the following commands: |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 50 | (if class is defined) |
| 51 | adb shell am instrument -w <package>/<runner> |
| 52 | (else) |
| 53 | adb shell am instrument -w -e class <class> <package>/<runner> |
| 54 | |
| 55 | Native tests: |
| 56 | ============= |
| 57 | The <test-native> element has the following attributes |
| 58 | |
| 59 | name build_path [continuous description] |
| 60 | |
| 61 | Where: |
| 62 | name: Self-descriptive name used to uniquely identify the test |
| 63 | build_path: File system path, relative to Android build root, to this |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 64 | package's Android.mk file. By convention the name of a test should match: |
| 65 | - test_*.[cc|cpp] |
| 66 | - *_test.[cc|cpp] |
| 67 | - *_unittest.[cc|cpp] |
| 68 | |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 69 | continuous: Optional boolean. Default is false. Set to true if tests are known |
| 70 | to be reliable, and should be included in a continuous test system. |
| 71 | false if they are under development. |
| 72 | description: Optional string. Default is empty. Short description (typically |
| 73 | less than 60 characters) about this test. |
Niko Catania | 55ebbc4 | 2009-04-03 14:13:05 -0700 | [diff] [blame] | 74 | extra_make_args: Optional string. Default is empty. Some test module require |
| 75 | extra make arguments to build. This string is append to the make command. |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 76 | |
| 77 | These attributes map to the following commands: |
Niko Catania | 55ebbc4 | 2009-04-03 14:13:05 -0700 | [diff] [blame] | 78 | make <build_path>/Android.mk <extra_make_args> |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 79 | adb sync |
| 80 | for test_prog in <tests built>; do |
| 81 | adb shell "/system/bin/${test_prog} >/dev/null 2>&1;echo \$?" |
| 82 | adb shell "rm /system/bin/${test_prog}" |
| 83 | done |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 84 | --> |
| 85 | |
| 86 | <test-definitions version="1"> |
| 87 | |
| 88 | <!-- system-wide tests --> |
| 89 | <test name="framework" |
| 90 | build_path="frameworks/base/tests/FrameworkTest" |
| 91 | package="com.android.frameworktest.tests" |
| 92 | class="com.android.frameworktest.AllTests" |
| 93 | coverage_target="framework" |
| 94 | continuous="true" /> |
| 95 | |
| 96 | <test name="android" |
| 97 | build_path="frameworks/base/tests/AndroidTests" |
| 98 | package="com.android.unit_tests" |
| 99 | class="com.android.unit_tests.AndroidTests" |
| 100 | coverage_target="framework" |
| 101 | continuous="true" /> |
| 102 | |
Brett Chabot | 6c6c1ab | 2009-05-06 11:45:33 -0700 | [diff] [blame] | 103 | <test name="account" |
| 104 | build_path="frameworks/base/tests/AndroidTests" |
| 105 | package="com.android.unit_tests" |
| 106 | class="com.android.unit_tests.accounts.AccountManagerServiceTest" |
| 107 | coverage_target="framework" /> |
| 108 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 109 | <test name="smoke" |
| 110 | build_path="frameworks/base/tests/SmokeTest" |
| 111 | package="com.android.smoketest.tests" |
| 112 | coverage_target="framework" |
| 113 | continuous="true" /> |
| 114 | |
| 115 | <test name="core" |
| 116 | build_path="frameworks/base/tests/CoreTests" |
| 117 | package="android.core" |
| 118 | class="android.core.CoreTests" |
| 119 | coverage_target="framework" |
| 120 | continuous="true" /> |
| 121 | |
| 122 | <test name="libcore" |
| 123 | build_path="frameworks/base/tests/CoreTests" |
| 124 | package="android.core" |
| 125 | class="android.core.JavaTests" |
| 126 | coverage_target="framework" /> |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 127 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 128 | <test name="apidemos" |
| 129 | build_path="development/samples/ApiDemos" |
| 130 | package="com.example.android.apis.tests" |
| 131 | coverage_target="ApiDemos" |
| 132 | continuous="true" /> |
| 133 | |
The Android Open Source Project | 6ffae01 | 2009-03-18 17:39:43 -0700 | [diff] [blame] | 134 | <test name="launchperf" |
| 135 | build_path="development/apps/launchperf" |
| 136 | package="com.android.launchperf" |
| 137 | class="com.android.launchperf.SimpleActivityLaunchPerformance" |
| 138 | coverage_target="framework" /> |
| 139 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 140 | <!-- targeted framework tests --> |
| 141 | <test name="heap" |
| 142 | build_path="frameworks/base/tests/AndroidTests" |
| 143 | package="com.android.unit_tests" |
| 144 | class="com.android.unit_tests.HeapTest" |
| 145 | coverage_target="framework" /> |
| 146 | |
| 147 | <test name="activity" |
| 148 | build_path="frameworks/base/tests/AndroidTests" |
| 149 | package="com.android.unit_tests" |
| 150 | class="com.android.unit_tests.activity.ActivityTests" |
| 151 | coverage_target="framework" /> |
| 152 | |
| 153 | <!-- obsolete? |
| 154 | <test name="deadlock" |
| 155 | build_path="frameworks/base/tests/Deadlock" |
| 156 | package="com.android.deadlock.tests" |
| 157 | coverage_target="framework" /> |
| 158 | --> |
| 159 | |
| 160 | |
Fred Quintana | 83ce803 | 2009-05-20 18:38:38 -0700 | [diff] [blame^] | 161 | <test name="contentprovideroperation" |
| 162 | build_path="frameworks/base/tests/FrameworkTest" |
| 163 | package="com.android.frameworktest.tests" |
| 164 | class="android.content.ContentProviderOperationTest" |
| 165 | coverage_target="framework" /> |
| 166 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 167 | <test name="tablemerger" |
| 168 | build_path="frameworks/base/tests/FrameworkTest" |
| 169 | package="com.android.frameworktest.tests" |
| 170 | class="android.content.AbstractTableMergerTest" |
| 171 | coverage_target="framework" /> |
| 172 | |
The Android Open Source Project | 6ffae01 | 2009-03-18 17:39:43 -0700 | [diff] [blame] | 173 | <test name="imf" |
| 174 | build_path="frameworks/base/tests/ImfTest" |
| 175 | package="com.android.imftest.tests" |
| 176 | coverage_target="framework" |
| 177 | continuous="true" /> |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 178 | |
| 179 | <!-- selected app tests --> |
| 180 | <test name="browser" |
| 181 | build_path="packages/apps/Browser" |
| 182 | package="com.android.browser" |
| 183 | runner=".BrowserTestRunner" |
| 184 | coverage_target="Browser" /> |
| 185 | |
| 186 | <test name="browserfunc" |
| 187 | build_path="packages/apps/Browser" |
| 188 | package="com.android.browser" |
| 189 | runner=".BrowserFunctionalTestRunner" |
| 190 | coverage_target="Browser" /> |
| 191 | |
| 192 | <test name="calendar" |
| 193 | build_path="packages/apps/Calendar/tests" |
| 194 | package="com.android.calendar.tests" |
| 195 | coverage_target="Calendar" |
| 196 | continuous="true" /> |
| 197 | |
| 198 | <test name="calprov" |
| 199 | build_path="packages/providers/CalendarProvider/tests" |
| 200 | package="com.android.providers.calendar.tests" |
| 201 | coverage_target="CalendarProvider" |
| 202 | continuous="true" /> |
| 203 | |
Owen Lin | 04eccd8 | 2009-05-14 18:55:34 -0700 | [diff] [blame] | 204 | <test name="camerastress" |
| 205 | build_path="packages/apps/Camera/tests" |
| 206 | package="com.android.camera.tests" |
| 207 | class="com.android.camera.StressTests" |
| 208 | coverage_target="Camera" /> |
| 209 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 210 | <test name="camera" |
| 211 | build_path="packages/apps/Camera/tests" |
Owen Lin | 04eccd8 | 2009-05-14 18:55:34 -0700 | [diff] [blame] | 212 | package="com.android.camera.tests" |
| 213 | class="com.android.camera.UnitTests" |
| 214 | continuous="true" |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 215 | coverage_target="Camera" /> |
| 216 | |
| 217 | <test name="contactsprov" |
| 218 | build_path="packages/providers/GoogleContactsProvider/tests" |
| 219 | package="com.android.providers.contactstests" |
| 220 | coverage_target="ContactsProvider" /> |
| 221 | |
| 222 | <test name="email" |
| 223 | build_path="packages/apps/Email" |
| 224 | package="com.android.email.tests" |
| 225 | coverage_target="Email" |
| 226 | continuous="true" /> |
| 227 | |
| 228 | <test name="emailsmall" |
| 229 | build_path="packages/apps/Email" |
| 230 | package="com.android.email.tests" |
| 231 | class="com.android.email.SmallTests" |
| 232 | coverage_target="Email" /> |
| 233 | |
| 234 | <test name="media" |
| 235 | build_path="frameworks/base/media/tests/MediaFrameworkTest" |
| 236 | package="com.android.mediaframeworktest" |
| 237 | runner=".MediaFrameworkTestRunner" |
| 238 | coverage_target="framework" |
| 239 | continuous="true" /> |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 240 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 241 | <test name="mediaunit" |
| 242 | build_path="frameworks/base/media/tests/MediaFrameworkTest" |
| 243 | package="com.android.mediaframeworktest" |
| 244 | runner=".MediaFrameworkUnitTestRunner" |
| 245 | coverage_target="framework" /> |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 246 | |
Brett Chabot | a3a8aeb | 2009-03-31 14:51:13 -0700 | [diff] [blame] | 247 | <test name="musicplayer" |
| 248 | build_path="packages/apps/Music" |
| 249 | package="com.android.music.tests" |
| 250 | runner=".MusicPlayerFunctionalTestRunner" |
Yu Shan Emily Lau | d17eb0b | 2009-04-09 13:55:00 -0700 | [diff] [blame] | 251 | coverage_target="Music" /> |
Brett Chabot | a3a8aeb | 2009-03-31 14:51:13 -0700 | [diff] [blame] | 252 | |
| 253 | <!-- obsolete? |
| 254 | <test name="mediaprov" |
| 255 | build_path="tests/MediaProvider" |
| 256 | package="com.android.mediaprovidertests" |
| 257 | runner=".MediaProviderTestsInstrumentation" |
| 258 | coverage_target="MediaProvider" /> |
| 259 | --> |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 260 | |
| 261 | <test name="mms" |
| 262 | build_path="packages/apps/Mms" |
| 263 | package="com.android.mms.tests" |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 264 | coverage_target="Mms" /> |
| 265 | |
| 266 | <test name="mmslaunch" |
| 267 | build_path="packages/apps/Mms" |
| 268 | package="com.android.mms.tests" |
| 269 | runner="com.android.mms.SmsLaunchPerformance" |
| 270 | coverage_target="Mms" /> |
| 271 | |
Brett Chabot | a3a8aeb | 2009-03-31 14:51:13 -0700 | [diff] [blame] | 272 | |
| 273 | <!-- obsolete? |
| 274 | <test name="ringtone" |
| 275 | build_path="tests/RingtoneSettings" |
| 276 | package="com.android.ringtonesettingstests" |
| 277 | runner=".RingtoneSettingsInstrumentationTestRunner" |
| 278 | coverage_target="Settings" /> |
| 279 | --> |
| 280 | |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 281 | <!-- native tests --> |
| 282 | <test-native name="libstdcpp" |
| 283 | build_path="system/extras/tests/bionic/libstdc++" |
Niko Catania | 55ebbc4 | 2009-04-03 14:13:05 -0700 | [diff] [blame] | 284 | description="Bionic libstdc++." |
| 285 | extra_make_args="BIONIC_TESTS=1" /> |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 286 | |
Nicolas Catania | ff096c1 | 2009-05-01 11:55:36 -0700 | [diff] [blame] | 287 | <!-- pending patch 820 |
| 288 | <test-native name="gtest" |
| 289 | build_path="external/gtest" |
| 290 | description="Google test." |
| 291 | extra_make_args="GTEST_TESTS=1" /> |
| 292 | --> |
Niko Catania | 2472866 | 2009-04-02 23:33:53 -0700 | [diff] [blame] | 293 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 294 | </test-definitions> |