400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

安卓CTS官方文档之兼容性方案概览-创新互联

官方英文文档链接:https://source.android.com/compatibility/overview.html

创新互联公司公司2013年成立,先为龙岩等服务建站,龙岩等地企业,进行企业商务咨询服务。为龙岩企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

Compatibility Program Overview

兼容性方案概览

The Android compatibility program makes it easy for mobile device manufacturers to develop compatible Android devices.

安卓的兼容性方案让安卓手机生产商能够很容易就开发中可兼容的安卓设备(天地会珠海分舵注:可兼容什么呢?就是可以兼容标准google提供的安卓系统可以支持的功能,以防手机生产商把开源的安卓系统修改得面目全非后,开发者开发的应用都安装不上了,所以才有了CTS来要求手机开发上必须测试通过才能上google play)。

Program goals

方案目标

The Android compatibility program works for the benefit of the entire Android community, including users, developers, and device manufacturers.Each group depends on the others. Users want a wide selection of devices and great apps; great apps come from developers motivated by a large market for their apps with many devices in users' hands; device manufacturers rely on a wide variety of great apps to increase their products' value for consumers.

安卓的兼容性方案兼顾了整个安卓社区各个团体的利益,包括用户,开发人员和手机生产商。其中这些团体之间互相依赖,用户希望在广大范围内对手机类型和优秀应用进行选择;而优秀的应用的开发者又会受到一个广大的市场所激励而去开发出更多优秀的应用,因为他们的应用可以通过这个广大的市场到达使用不同类型手机的用户手上;而设备生产商又依赖这些广泛的优秀的应用来提升它们的产品对用户的价值。(天地会珠海分舵注:其实整一段话google的意义就是想表达我的google play是一个多么强大的应用市场。你安卓设备生产商设备想赚钱,想更多的开发者可以开发适合你的机型的应用,想更多的用户使用你的手机,那么你就要用我的google play,而你要用我的google play,那么你阉割修改后的安卓操作系统就必须满足一定的规则,不然用户在我的google play下载了个应用到你手上竟然用不了就对大家都没有好处了)

Our goals were designed to benefit each of these groups:

我们的目的是为了让以下这部分人受惠而设计的:

The Android compatibility program consists of three key components:

安卓兼容性方案由以下3个关键部分组成:

Just as each version of the Android platform exists in a separate branch in the source code tree, there is a separate CTS and CDD for each version as well. The CDD, CTS, and source code are -- along with your hardware and your software customizations -- everything you need to create a compatible device.

正如不同版本的安卓平台的源码会从源码树中分出不同的对应的分支一样,不同版本的CTS和CDD也会有不同的分支(天地会珠海分舵注:不同版本的安卓系统会有对应版本的CTS和CDD与其对应)。上面描述的CDD,CTS和源码,再加上你作为手机生产商提供的自身的硬件和软件定制,这就是你创造一个兼容性设备所需要的所有东西了。

Compatibility Definition Document

兼容性定义文档(CDD)

For each release of the Android platform, a detailed CDD will be provided. The CDD represents the "policy" aspect of Android compatibility.

每当一个安卓操作系统平台发布的时候都会提供一个详尽的CDD文档,该文档代表了安卓兼容性的“策略”定义。

No test suite, including CTS, can truly be comprehensive. For instance, the CTS includes a test that checks for the presence and correct behavior of OpenGL graphics APIs, but no software test can verify that the graphics actually appear correctly on the screen. More generally, it's impossible to test the presence of hardware features such as keyboards, display density, Wi-Fi, and Bluetooth.

有些情况下,包括CTS在内,是没有任何测试套件是可以全能的对所有兼容性方面都做到详尽的自动测试的。比如,在CTS中有一个测试时用来检查OpenGL图形库APIs在屏幕上的正确呈现和正确行为的,但是没有任何软件测试可以验证对应的图形是真的呈现在屏幕上的(天地会珠海分舵注:包括该CTS的测试用例也只是调用OpenGL的API而已,而该测试是不能检测到屏幕是否有显示对应图形,只能靠肉眼去观测。这个也就是在软件测试行业所共知的不是所有功能都是可以实现测试自动化的)。更通俗的来说,(用测试工具)去测试硬件呈现方面的功能是不可能的,比如去测试按键物理键盘(是否可用),屏幕密度,Wi-Fi硬件功能,蓝牙硬件功能。

The CDD's role is to codify and clarify specific requirements, and eliminate ambiguity. The CDD does not attempt to be comprehensive. Since Android is a single corpus of open-source code, the code itself is the comprehensive "specification" of the platform and its APIs. The CDD acts as a "hub" referencing other content (such as SDK API documentation) that provides a framework in which the Android source code may be used so that the end result is a compatible system.

CDD所处的角色就是去定义和澄清具体的需求,并且消除模棱两可的有歧义的情况。CDD不会去尝试做到无所不包含,因为安卓自身就是一个开源的代码集合,代码自身就是对安卓平台和它提供的APIs的一个全方位的”说明文档“(天地会珠海分舵注:了解过敏捷开发和重构等相关知识的应该都清楚一个说法--去文档化,优秀代码就是最好的文档)。CDD扮演的就是一个”集线器“角色,(把进来的对兼容性的需求)重新分发引用到其他对应的内容(比如SDK API 文档),该内容提供了一个安卓源码会用到的框架,这样整个系统就自然会成为一个兼容的系统了。(天地会珠海分舵注:这一段应该有更好的翻译方式,如果看官有的请提供出来,本人会选择性采纳)

If you want to build a device compatible with a given Android version, start by checking out the source code for that version, and then read the corresponding CDD and stay within its guidelines. For additional details, simply examine the latest CDD.

如果你想在一个已定的安卓版本中创建一个兼容性设备,请从把该版本的安卓系统×××下来开始,然后仔细的阅读该版本源码对应的CDD文档并遵循它的指引。更多额外的相关内容,请查看最近的CDD文档。

Compatibility Test Suite 

兼容性测试套件

The CTS is a free, commercial-grade test suite, available for download. The CTS represents the "mechanism" of compatibility.

CTS是一个免费的,商业级别的测试套件,且可供下载。CTS代表了安卓兼容性的”机制“。

The CTS runs on a desktop machine and executes test cases directly on attached devices or an emulator. The CTS is a set of unit tests designed to be integrated into the daily workflow (such as via a continuous build system) of the engineers building a device. Its intent is to reveal incompatibilities early on, and ensure that the software remains compatible throughout the development process.

CTS是跑在你的桌面系统上面来驱动连接上桌面系统主机的设备或者模拟器去运行相应的测试用例(脚本)的。CTS是一套单元测试的集合,是设计来让我们来集成到我们的日常工作流程(比如通过集成到我们的持续集成系统构建系统)来帮助工程师构建一个安卓设备系统的。它的本意就是去在早期把不兼容的地方给暴露出来,去保证在整个安卓设备系统开发的流程中该设备是一直保持兼容的。

Compatibility Test Suite Verifier (CTS Verifier)

兼容性测试套件验证器

The Compatibility Test Suite Verifier (CTS Verifier) is a supplement to the CTS available for download. CTS Verifier provides tests for APIs and functions that cannot be tested on a stationary device without manual input (e.g. audio quality, accelerometer, etc).

兼容性测试套件验证器(CTS 验证器)是CTS的一个附件功能(天地会珠海分舵:其实就是一个APK),可以在这里进行下载。CTS验证器提供了针对一些在没有户输入等交互动作就完成不了的APIs和功能测试(比如:音频质量,加速计,等等)

For details on the CTS, consult the CTS introduction.

关于CTS的详细信息,请查询”CTS简介“。

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页标题:安卓CTS官方文档之兼容性方案概览-创新互联
本文地址:http://www.bluegullmedia.com/article/cdjjsg.html

其他资讯

让你的专属顾问为你服务

0.0415s