AuthorBlog:秋城https://www.cnblogs.com/houser0323/

Android Platform Testing

This content is geared toward Android platform developers. Before understanding how testing is done on the Android platform, please refer to the Android platform architecture for an overview.

Then delve into the precise technologies available to you in this section, such as the Vendor Test Suite (VTS) and its myriad video and codelab tutorials.

Also note the security-specific testing mechanisms available to detect and harden your devices against vulnerabilities.

For app testing, start with the Fundamentals of Testing and conduct the Android Testing Codelab using the samples provided.

Finally, note basic presubmit testing is available to you through Repo Hooks that can run linters, check formatting, and trigger unit tests before proceeding, such as uploading a commit. Note these hooks are disabled by default. See the Repo Hooks introduction for more details.
What and how to test

A platform test typically interacts with one or more of the Android system services, or Hardware Abstraction Layer (HAL) layers, exercises the functionalities of the subject under test, and asserts correctness of the testing outcome.

As such, a platform test may:

exercise framework APIs via application framework; specific APIs being exercised may include:
    public APIs intended for third-party applications
    hidden APIs intended for privileged applications, namely system APIs
    private APIs (@hide, or protected, package private)
invoke Android system services via raw binder/IPC proxies directly
interact directly with HALs via low-level APIs or IPC interfaces

Types 1 and 2 are typically written as instrumentation tests, while type 3 are usually written as native tests using the gtest framework.

To learn more, see our end-to-end examples:

instrumentation targeting an application
self-instrumentation
native test

Become familiar with these tools, as they are intrinsic to testing in Android.
Compatibility Test Suite (CTS)

Android Compatibility Test Suite is a suite of various types of tests, used to ensure compatibility of Android framework implementations across OEM partners, and across platform releases. The suite also includes instrumentation tests and native tests (also using gtest framework).

CTS and platform tests are not mutually exclusive, and here are some general guidelines:

if a test is asserting correctness of framework API functions/behaviors, and it should be enforced across OEM partners, it should be in CTS
if a test is intended to catch regressions during platform development cycle, and may require privileged permission to carry out, and may be dependent on implementation details (as released in AOSP), it should only be platform tests

Vendor Test Suite (VTS)

The Vendor Test Suite (VTS) automates HAL and OS kernel testing. To use VTS to test an Android native system implementation, set up a testing environment then test a patch using a VTS plan.
Trade Federation Testing Infrastructure

Trade Federation (tradefed or TF for short) is a continuous test framework designed for running tests on Android devices. TF can run functional tests locally, at your desk, within your platform checkout. There are two required files to run a test in TF, a java test source and an XML config. See RebootTest.java and reboot.xml for examples.
Debugging

The Debugging section summarizes useful tools and related commands for debugging, tracing, and profiling native Android platform code when developing platform-level features.

【读书笔记】https://source.android.google.cn/compatibility/tests?hl=en的更多相关文章

  1. 【读书笔记】https://source.android.google.cn/devices/bootloader

    https://source.android.google.cn/devices/bootloader 本文主要记录aosp官网关于bootloader的相关资料 Bootloader A bootl ...

  2. 对怎样充分利用安卓官方开发网站的一个简单性介绍介绍-https://developer.android.google.cn/docs/

    一,谷歌的安卓官方网站-https://developer.android.google.cn/docs/ ,在网站里面可以查询开发文档,开发指导,设计原则,制作app的例子等等,无论对于新手还是老手 ...

  3. source.android.google && developer.android.google

    https://source.android.google.cn/ https://developer.android.google.cn/ https://source.android.com/co ...

  4. developer.android.google.cn

    Android Studio官方 Android IDE https://developer.android.google.cn/studio/index.html 探索 Android Studio ...

  5. [读书笔记]《Android开发艺术探索》第十五章笔记

    Android性能优化 Android不可能无限制的使用内存和CPU资源,过多的使用内存会导致内存溢出,即OOM. 而过多的使用CPU资源,通常是指做大量的耗时任务,会导致手机变的卡顿甚至出现程序无法 ...

  6. 读书笔记--Android Gradle权威指南(上)

    本篇文章已授权微信公众号 dasu_Android(大苏)独家发布 最近看了一本书<Android Gradle 权威指南>,对于 Gradle 理解又更深了,但不想过段时间就又忘光了,所 ...

  7. 【2018.08.13 C与C++基础】C++语言的设计与演化读书笔记

    先占坑 老实说看这本书的时候,有很多地方都很迷糊,但却说不清楚问题到底在哪里,只能和Effective C++联系起来,更深层次的东西就想不到了. 链接: https://blog.csdn.net/ ...

  8. 读书笔记--Android Gradle权威指南(下)

    前言 最近看了一本书<Android Gradle 权威指南>,收获挺多,就想着来记录一些读书笔记,方便后续查阅. 本篇内容是基于上一篇:读书笔记--Android Gradle权威指南( ...

  9. Android群英传神兵利器读书笔记——第三章:Android Studio奇技淫巧

    这篇文章篇幅较长,可以使用版权声明下面的目录,找到感兴趣的进行阅读 3.1 Android Studio使用初探 Project面板 Stucture面板 Android Monitor Keymap ...

随机推荐

  1. PCoA|NMDS|STRESS|RDA |RA|Unimodal|CCA|Generalized Joint Attribute Modeling

    PCoA:主坐标轴分析 数值型变量使用各种距离公式,而分类变量看是否相同,比如, Aabbcc || Aaffff 其中,两个相同,4个不同,一组6个,则(6+6-2*2)=8. PC0A与PCA区别 ...

  2. 大数据学习——MapReduce学习——字符统计WordCount

    操作背景 jdk的版本为1.8以上 ubuntu12 hadoop2.5伪分布 安装 Hadoop-Eclipse-Plugin 要在 Eclipse 上编译和运行 MapReduce 程序,需要安装 ...

  3. 887A. Div. 64#模特的数学技巧(字符串处理)

    问题出处:http://codeforces.com/problemset/problem/887/A 问题大意:对于给出的一串二进制数,能否通过去掉一些数字,使之成为十进制下64的倍数 #inclu ...

  4. Java线程池面试

    New Thread的弊端 每次new Thread会新建对象,性能差 线程缺乏统一管理,可能无限制的新建线程,相互竞争,有可能占用过多系统资源导致死机或OOM 缺少更多功能,如更多执行.定期执行.线 ...

  5. 计量经济与时间序列_ADF单位根检验步骤

    1 ADF检验也叫扩展的迪克富勒检验,主要作用是检测序列的平稳性,也是最常用检测序列平稳性的检验方法. 2 何为:平稳性?单位根?(略),见这部分随便的其他内容有讲解.是建模对数据的先决条件. 3 A ...

  6. rsync+inotify实现文件实时同步

    一.相关组件简介 1.rsync 与传统的cp.tar备份方式相比,rsync具有安全性高.备份迅速.支持增量备份等优点,通过rsync可以解决对实时性要求不高的数据备份需求,例如定期的备份文件服务器 ...

  7. Linux下查找Nginx配置文件位置

    1.查看Nginx进程 命令: ps -aux | grep nginx 圈出的就是Nginx的二进制文件 2.测试Nginx配置文件 /usr/sbin/nginx -t 可以看到nginx配置文件 ...

  8. 混合欧拉回路poj 1637 Sightseeing tour

    把该图的无向边随便定向,计算每个点的入度和出度.如果有某个点出入度之差为奇数,那么肯定不存在欧拉回路.因为欧拉回路要求每点入度 = 出度,也就是总度数为偶数,存在奇数度点必不能有欧拉回路: 好了,现在 ...

  9. 用 Apache Derby 进行 ODBC 编程

    用 Apache Derby 进行 ODBC 编程 https://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0409kar ...

  10. 在Linux中#!/usr/bin/python之后把后面的代码当成程序来执行。 但是在windows中用IDLE编程的话#后面的都是注释,之后的代码都被当成文本了。 该怎么样才能解决这个问题呢?

    本文转自:http://bbs.csdn.net/topics/392027744?locationNum=6&fps=1 这种问题是大神不屑于解答,小白又完全不懂的问题... 同遇到这个问题 ...