有谁做过cts测试是什么啊?

测漏仪-CTS泄漏测试系统
会员指数:指数 0
经营模式:生产型
所在地区:广东广州
未审核会员商铺
广州市上腾电子科技有限公司
站内产品搜索
公司:广州市上腾电子科技有限公司
您可能感兴趣
产品分类展示:
产品名称/介绍
品牌:CTS ;加工定制:否 ;型号:BB ;产品用途:检测 ;测量范围:14.7psiv-200测量对象:汽车零部件、医疗产品、电子产品 ;尺寸:270mm*213mm*310重量:8 kg
品牌:CTS ;型号:C-28 ;加工定制:是 ;外形尺寸:162mm*213mm*176重量:5 K;用途:产品测漏
品牌:CTS ;型号:C-20 ;加工定制:否 ;重量:5 K
品牌:CTS ;型号:C20 ;加工定制:否 ;外形尺寸:162mm高*213mm宽*176mm深;重量:6 K;用途:气密检测
品牌:CTS ;型号:I28 ;加工定制:否 ;外形尺寸:120mmW*92.5mmH*87.5mmD重量:5 K;用途:检漏测试
品牌:CTS ;型号:M24 ;加工定制:否 ;外形尺寸:324mm高*426mm宽*352mm深;重量:7 K;用途:测漏测试
品牌:型号:非标 ;加工定制:是 ;外形尺寸:非标重量:20 K;用途:自动化测试
免责声明:以上所展示的信息由企业自行提供,内容的真实性、准确性和合法性由发布企业负责。Goepe对此不承担任何保证责任。
广州市上腾电子科技有限公司
地址:广州市萝岗区科学城玉树工业园G栋首层
技术支持:&&&&&|&4957人阅读
Android(26)
为了保证开发的应用在所有兼容Android的设备上正常运行,并保证一致的用户体验,Google制定了CTS(Compatibility Test Suite)来确保设备运行的Android系统全面兼容Android规范,Google也提供了一份兼容性标准文档(Compatibility Definition Document, CDD)。
在进行CTS之前,需要先从google官网下载相关文件,需要自卑梯子翻墙。下载链接:
。目前最新的版本是Android5.1的版本,主要包含ARM和X86架构的,如果你的设备这两种架构的都包含,那么都需要测试一下。由于手头的机器是Android4.4的版本,因此下载了Android4.4的CTS进行测试。
大部分是基于Junit和仪表盘技术编写的。还扩展了自动化测试过程,可以自动执行用例,自动收集和汇总测试结果。CTS采用XML配置文件的方式将这些测试用例分组成多个测试计划(plan),第三方也可以创建自己的plan。
CTS测试执之前要做的准备工作如下:
<span style="color:#. 下载兼容性测试用例包,并解压,解压后的文件名命名为“android-cts”。
<span style="color:#. 重置手机(恢复出厂设置)。
<span style="color:#. 去掉谷歌账户。
<span style="color:#. 设置手机语言为英语:Setting-&Language&input-&language-&English(UnitedStates)。
<span style="color:#. 插入SIM卡和外置SD卡(SD卡需要&#26684;式化:Settings-&Storage-&EraseSD
card-&Erase SD card-&Erase Everything)。
<span style="color:#. 插入USB,连接手机到电脑,可以用adb devices检查,是否正确连接。
<span style="color:#. 打开wifi,并连接到可用wifi。
<span style="color:#. 打开蓝牙,无须配对。
<span style="color:#. 保证手机无操作<span style="color:#分钟后LCDoff:Settings-&Display-&Sleep-&30 minutes.
<span style="color:#. 去掉屏幕锁:Settings-&Security-&ScreenLock的&#20540;是“None”.
<span style="color:#. 打开Settings-&Locationservices-&“Google location services”, ”GPS satellites”, ”Location &Google search”.
<span style="color:#. 打开Settings-&Accessibility-&Developeroptions-&USB debugging(USB调试).
<span style="color:#. 打开Settings-&Accessibility-&Developeroptions-&Stay Awake(保持唤醒).
<span style="color:#. 打开Settings-&Accessibility-&Developeroptions-&Allow mock location(允许模拟位置).
<span style="color:#. 通过Settings-&Speechsynthesis-&Install voice data安装“Text To Speech”文件(com.svox.langpack.installer-1.apk),假如android-cts/repository/testcases/中没有此文件,就省去这一步。
<span style="color:#. 如果需要执行可访问性方面的兼容性测试,则安装“CtsDelegatingAccessibilityService.apk”(adbinstall –r */android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk),并将Settings-&Accessibility-&DelegatingAccessibility
Service选项打开。
<span style="color:#. 如果需要执行设备管理方面的兼容性测试,则安装“CtsDeviceAdmin.apk” (adb install –r*/android-cts/repository/testcases/ CtsDeviceAdmin.apk),并将Setting-&Security-&DevicesAdministrators-&android.devicesadmin.cts.CtsDevicesAdmin等选项打开。
TestCase里面包含很多的测试用例,可以全部测试,也可以只测试部分。
做完了前面的准备工作之后,就可以开始CTS测试了。测试之前,先把Android SDK中adb的路径加入系统的环境变量中,然后键入:
#adbdevices
查看已识别已经连接的设备。
进入到“android-cts/tools”目录,接着执行
#./cts-tradefed
接着运行测试设备解码方面的测试用例:
#runcts --class android.media.cts.DecoderTest
可以发现红色箭头所指的部分测试用例已经通过,有些命令不熟悉的话可以键入help。当该单元下的测试用例都完成以后,可以键入:
#cts-tf& l r
查询测试结果,如下图所示:
查看android-cts/repository/results/目录,可以发现生成的XML文件:
把testResult.xml文件拖入Safari浏览器中,可以很方便的查看测试结果:
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:282621次
积分:4106
积分:4106
排名:第4369名
原创:115篇
转载:10篇
评论:124条
(1)(3)(1)(2)(32)(3)(5)(3)(6)(37)(5)(28)android的cts测试到底有多细?
android的cts测试到底有多细?
查看次数7444 发表时间 13:36:32
以wifi测试为列android.net.wifi模块的cts测试结果如下:android.app.cts.SystemFeaturesTest-- testBluetoothFeaturepass&-- testCameraFeaturespass&-- ...
以wifi测试为列
android.net.wifi模块的cts测试结果如下:
android.app.cts.SystemFeaturesTest
-- testBluetoothFeature
-- testCameraFeatures
-- testFeatureNamespaces
-- testLiveWallpaperFeature
-- testLocationFeatures
-- testNfcFeatures
-- testScreenFeatures
-- testSensorFeatures
-- testSipFeatures
-- testTelephonyFeatures
-- testTouchScreenFeatures
-- testUsbAccessory
-- testWifiFeature
android.net.http.cts.ApacheHttpClientTest
-- testAndroidTestCaseSetupProperly
-- testExecute_withMobile
-- testExecute_withWifi
android.net.wifi.cts.ConcurrencyTest
-- testAndroidTestCaseSetupProperly
-- testConcurrency
android.net.wifi.cts.ScanResultTest
-- testAndroidTestCaseSetupProperly
-- testScanResultProperties
android.net.wifi.cts.SupplicantStateTest
-- testAndroidTestCaseSetupProperly
-- testIsValidState
android.net.wifi.cts.WifiConfigurationTest
-- testAndroidTestCaseSetupProperly
-- testWifiConfiguration
android.net.wifi.cts.WifiInfoTest
-- testAndroidTestCaseSetupProperly
-- testWifiInfoProperties
android.net.wifi.cts.WifiManagerTest
-- testAndroidTestCaseSetupProperly
-- testSignal
-- testWifiManagerActions
-- testWifiManagerNetWork
-- testWifiManagerProperties
android.net.wifi.cts.WifiManager_WifiLockTest
-- testAndroidTestCaseSetupProperly
-- testWifiLock
android.permission.cts.NoWakeLockPermissionTest
-- testAndroidTestCaseSetupProperly
-- testMediaPlayerWakeLock
-- testPowerManagerWakeLockAcquire
-- testPowerManagerWakeLockAcquire2
-- testPowerManagerWakeLockRelease
-- testWifiLockAcquire
android.permission.cts.NoWifiStatePermissionTest
-- testAddNetwork
-- testAndroidTestCaseSetupProperly
-- testDisableNetwork
-- testDisconnect
-- testEnableNetwork
-- testGetConfiguredNetworks
-- testGetConnectionInfo
-- testGetDhcpInfo
-- testGetScanResults
-- testGetWifiState
-- testPingSupplicant
-- testReassociate
-- testReconnect
-- testRemoveNetwork
-- testSaveConfiguration
-- testSetWifiEnabled
-- testStartScan
-- testUpdateNetwork
wifi测试了这些模块,但是android的wifi接口函数远远超过这些,
/reference/android/net/wifi/package-summary.html
Describes information about a detected access point.&
A class representing a configured Wi-Fi network, including the security configuration.&
Recognized IEEE 802.11 authentication algorithms.&
Recognized group ciphers.&
Recognized key management schemes.&
Recognized pairwise ciphers for WPA.&
Recognized security protocols.&
Possible status of a network configuration.&
Enterprise configuration details for Wi-Fi.&
The Extensible Authentication Protocol method used &
The inner authentication method used &
Describes the state of any Wifi connection that is active or is in the process of being set up.&
This class provides the primary API for managing all aspects of Wi-Fi connectivity.&
Allows an application to receive Wifi Multicast packets.&
Allows an application to keep the Wi-Fi radio awake.&
A class representing Wi-Fi Protected Setup &
对比可以发现,cts测试了 Concurrency、ScanResult、SupplicantState、WifiConfiguration、WifiInfo、WifiManager、WifiManager_WifiLock,
查看下cts的wifi模块测试源码(版本android 4.0.4),
http://124.16.139.131:24080/lxr/source/cts/tests/tests/net/src/android/net/wifi/cts/?v=android-4.0.4
WifiInfoTest.java
* Copyright (C) 2008 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the &License&);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an &AS IS& BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
0017 package android.net.wifi.
0019 import dalvik.annotation.TestL
0020 import dalvik.annotation.TestTargetC
0021 import dalvik.annotation.TestTargetN
0022 import dalvik.annotation.TestT
0024 import android.content.BroadcastR
0025 import android.content.C
0026 import android.content.I
0027 import android.content.IntentF
0028 import android.net.wifi.SupplicantS
0029 import android.net.wifi.WifiI
0030 import android.net.wifi.WifiM
0031 import android.net.wifi.WifiManager.WifiL
0032 import android.test.AndroidTestC
0034 @TestTargetClass(WifiInfo.class)
0035 public class WifiInfoTest extends AndroidTestCase {
private static class MySync {
int expectedState = STATE_NULL;
private WifiManager mWifiM
private WifiLock mWifiL
private static MySync mMyS
private static final int STATE_NULL = 0;
private static final int STATE_WIFI_CHANGING = 1;
private static final int STATE_WIFI_CHANGED = 2;
private static final String TAG = &WifiInfoTest&;
private static final int TIMEOUT_MSEC = 6000;
private static final int WAIT_MSEC = 60;
private static final int DURATION = 10000;
private IntentFilter mIntentF
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
synchronized (mMySync) {
mMySync.expectedState = STATE_WIFI_CHANGED;
mMySync.notify();
protected void setUp() throws Exception {
super.setUp();
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
mMySync = new MySync();
mIntentFilter = new IntentFilter();
mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
mContext.registerReceiver(mReceiver, mIntentFilter);
mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
assertNotNull(mWifiManager);
mWifiLock = mWifiManager.createWifiLock(TAG);
mWifiLock.acquire();
if (!mWifiManager.isWifiEnabled())
setWifiEnabled(true);
Thread.sleep(DURATION);
assertTrue(mWifiManager.isWifiEnabled());
mMySync.expectedState = STATE_NULL;
protected void tearDown() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
super.tearDown();
mWifiLock.release();
mContext.unregisterReceiver(mReceiver);
if (!mWifiManager.isWifiEnabled())
setWifiEnabled(true);
Thread.sleep(DURATION);
super.tearDown();
private void setWifiEnabled(boolean enable) throws Exception {
synchronized (mMySync) {
mMySync.expectedState = STATE_WIFI_CHANGING;
assertTrue(mWifiManager.setWifiEnabled(enable));
long timeout = System.currentTimeMillis() &#43; TIMEOUT_MSEC;
while (System.currentTimeMillis() & timeout
&& mMySync.expectedState == STATE_WIFI_CHANGING)
mMySync.wait(WAIT_MSEC);
@TestTargets({
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getMacAddress&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getIpAddress&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getDetailedStateOf&,
args = {android.net.wifi.SupplicantState.class}
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getNetworkId&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getSSID&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getBSSID&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getSupplicantState&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getLinkSpeed&,
@TestTargetNew(
level = PLETE,
method = &toString&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getRssi&,
@TestTargetNew(
level = TestLevel.PARTIAL,
method = &getHiddenSSID&,
public void testWifiInfoProperties() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
// this test case should in Wifi environment
WifiInfo wifiInfo = mWifiManager.getConnectionInfo();
assertNotNull(wifiInfo);
assertNotNull(wifiInfo.toString());
SupplicantState.isValidState(wifiInfo.getSupplicantState());
WifiInfo.getDetailedStateOf(SupplicantState.DISCONNECTED);
wifiInfo.getSSID();
wifiInfo.getBSSID();
wifiInfo.getIpAddress();
wifiInfo.getLinkSpeed();
wifiInfo.getRssi();
wifiInfo.getHiddenSSID();
wifiInfo.getMacAddress();
setWifiEnabled(false);
Thread.sleep(DURATION);
wifiInfo = mWifiManager.getConnectionInfo();
assertEquals(-1, wifiInfo.getNetworkId());
assertEquals(WifiManager.WIFI_STATE_DISABLED, mWifiManager.getWifiState());
上面的assert部分为断言,用来检查cts的测试结果是pass还是fail。你会发现cts的测试比较简单,它只能保证 你的android设备支持wifi,和中间件接口控制wifi的工作。
搜遍了wifi的全部测试模块,都没有找到哪里验证了 WifiConfiguration.KeyMgmt (wifi鉴权)。
官方说明cts覆盖范围:
/compatibility/cts-intro.html#areas-covered
它对Platform API只能确保 接口参数定义正确、类名正确、属性和
正确、容错处理正确。 它没法保证我的功能会正常。因为功能都传递给了native层代码处理。&
Areas Covered
The unit test cases cover the following areas to ensure compatibility:
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 SDKandroid.provider package: contacts, browser, settings, etc.
Platform Intents
The CTS tests the core platform intents, as documented in the SDK Available Intents.
Platform Permissions
The CTS tests the core platform permissions, as documented in the SDK Available Permissions.
Platform Resources
The CTS tests for correct handling of the core platform resource types, as documented in the SDKAvailable Resource Types. This includes tests for: simple values, drawables, nine-patch, animations, layouts, styles and themes, and loading alternate resources.
(转发请注明转自:)
&&相关推荐
&&&&&&( 13:36:32)
&&&&&&( 13:36:32)
&&&&&&( 13:36:32)
&&&&&&( 13:36:32)
&&&&&&( 13:36:33)
&&&&&&( 02:36:34)
&&&&&&( 02:36:34)
&&&&&&( 02:36:34)
&&&&&&( 02:36:34)
&&&&&&( 02:36:32)
&&发表评论
(不超过20个字符或10个汉字)
最新发布...
最新推荐...
浏览最多...
点击:130357
点击:122131
点击:108454
点击:89270
点击:84574
点击:72692
点击:71105
点击:70078
点击:65035
点击:61362}

我要回帖

更多关于 android cts测试 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信