망고 안드로이드 CTS 테스트
https://source.android.com/compatibility/cts-intro.html
[icanjji@icanjji-pc Downloads]$ ls
adt-bundle-linux-x86_64-20131030.zip android-sdk_r22.3-linux.tgz
[icanjji@icanjji-pc Downloads]$ sudo cp *
/opt/
android-cts-4.0.3_r3-linux_x86-arm.zip 압축을
풀었다.
[root@icanjji-pc
tools]# export PATH=/opt/java/bin:$PATH
[root@icanjji-pc tools]# ./cts-tradefed
02-26 20:34:52 W/DeviceManager: You are
running an older version of fastboot, please update it.
Android CTS 4.0.3_r3
cts-tf > 02-26 20:34:52 I/DeviceManager:
Detected new device BABABEEFBABABEEF
cts-tf >
cts-tf >
cts-tf > run cts
Java
cts-tf > run cts --plan CTS
02-26 21:30:55 I/TestInvocation: Starting
invocation for 'cts' on build '4.0.3_r3' on device BABABEEFBABABEEF
02-26 21:30:55 I/BABABEEFBABABEEF: Created
result dir 2014.02.26_21.30.55
cts-tf > 02-26 21:31:24
I/BABABEEFBABABEEF: Collecting device info
02-26 21:31:25 I/BABABEEFBABABEEF:
-----------------------------------------
02-26 21:31:25 I/BABABEEFBABABEEF: Test
package android.apidemos.cts started
02-26 21:31:25 I/BABABEEFBABABEEF:
-----------------------------------------
02-26 21:31:35 I/BABABEEFBABABEEF:
android.apidemos.cts.ApiDemosTest#testNumberOfItemsInListView PASS
02-26 21:31:38 I/BABABEEFBABABEEF:
android.apidemos.cts package complete: Passed 1, Failed 0, Not Executed 0
02-26 21:31:38 I/BABABEEFBABABEEF:
-----------------------------------------
02-26 21:31:38 I/BABABEEFBABABEEF: Test
package android.acceleration started
02-26 21:31:38 I/BABABEEFBABABEEF:
-----------------------------------------
02-26 21:31:40 I/BABABEEFBABABEEF:
android.acceleration.cts.HardwareAccelerationTest#testIsHardwareAccelerated
PASS
02-26 21:31:40 I/BABABEEFBABABEEF:
android.acceleration.cts.HardwareAccelerationTest#testNotAttachedView PASS
02-26 21:31:40 I/BABABEEFBABABEEF:
android.acceleration.cts.SoftwareAccelerationTest#testIsHardwareAccelerated
PASS
02-26 21:31:41 I/BABABEEFBABABEEF:
android.acceleration.cts.SoftwareAccelerationTest#testNotAttachedView PASS
These media files are
required for the CTS media stress tests.
Older Android Versions
다운로드
받습니다.
Workflow
This section summarizes
CTS setup. Please refer to the CTS User Manual for detailed instructions.
1.
Download the
CTS and CTS media files.
2.
Attach at least one device (or
emulator) to your machine.
3.
For CTS versions 2.1 R2 through
4.2 R4, set up your device (or emulator) to run the accessibility tests:
1.
adb install -r
android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk
2.
On the device, enable Settings
> Accessibility > Accessibility > Delegating Accessibility Service
4.
For CTS 2.3 R4 and beyond, set
up your device to run the device administration tests:
1.
adb install -r
android-cts/repository/testcases/CtsDeviceAdmin.apk
2.
On the device, enable the two android.deviceadmin.cts.CtsDeviceAdminReceiver*
device
administrators under Settings > Location & security > Select device
administrators
Note:
Make sure the android.deviceadmin.cts.CtsDeviceAdminDeactivatedReceiver
stays
disabled in the same menu.
5.
For CTS 2.3 R12 and beyond, the
CTS media files must be copied to the device's external storage. Check section
4.2 of the latest CTS manual for further details on copying these files:
1.
Unzip the CTS Media zip file.
2.
Run the following command. If
no resolution is specified, the default maximum resolution of 480x360 is
assumed:
copy_media.sh
[720x480|1280x720|1920x1080|all] [-s serial]
6.
Launch the CTS. The CTS test
harness loads the test plan onto the attached devices. For each test in the
test harness:
o The
test harness pushes an .apk file to each device, executes the test through
instrumentation, and records test results.
o The
test harness removes the .apk file from each device.
7.
Once all the tests are
executed, view the test results in your browser and use them to adjust your
design. You can continue to run the CTS throughout your development process.
Types of test cases
The CTS includes the
following types of test cases:
·
Unit tests test
atomic units of code within the Android platform; e.g. a single class, such as
java.util.HashMap.
·
Functional tests test
a combination of APIs together in a higher-level use-case.
·
Reference application tests instrument
a complete sample application to exercise a full set of APIs and Android
runtime services.
Future versions of the
CTS will include the following types of test cases:
·
Robustness tests test
the durability of the system under stress.
·
Performance tests test
the performance of the system against defined benchmarks, for example rendering
frames per second.
Areas Covered
The unit test cases
cover the following areas to ensure compatibility:
Area
|
Description
|
Signature tests
|
For each Android release, there are
XML files describing the signatures of all public APIs contained in the
release. The CTS contains a utility to check those API signatures against the
APIs available on the device. The results from signature checking are recorded
in the test result XML file.
|
Platform API Tests
|
Test the
platform (core libraries and Android Application Framework) APIs as
documented in the SDK Class Index to ensure API correctness, including
correct class, attribute and method signatures, correct method behavior, and
negative tests to ensure expected behavior for incorrect parameter handling.
|
Dalvik VM Tests
|
The tests focus
on testing the Dalvik VM.
|
Platform Data
Model
|
The CTS tests
the core platform data model as exposed to application developers through
content providers, as documented in the SDK android.provider package: contacts, browser,
settings, etc.
|
Platform Intents
|
|
Platform
Permissions
|
|
Platform
Resources
|
The CTS tests
for correct handling of the core platform resource types, as documented in
the SDK Available Resource Types. This includes
tests for: simple values, drawables, nine-patch, animations, layouts, styles
and themes, and loading alternate resources.
|