今天开始我的CTS源代码学习(未完)

记录:

CreatePrivateDataTest.java

InstrumentationFailToRunTest.java  继承自TestCase。

TestCase继承自DeviceObServer,其中有TestSuite,Test,Collection<Test>需要先看懂。(另开一个学习集合的帖子)

先看,interface DeviceObserver: 这是设备的观察者模式,用来看安装,卸载,超时,的状态,这是一个接口

其中包含方法有

void notifyInstallingComplete(final int resultCode)

void notifyUninstallingComplete(final int resultCode)

void notifyInstallingTimeout(final TestDevice testDevice)

void notifyUninstallingTimeout(final TestDevice testDevice)

void notifyTestingDeviceDisconnected()

 其中的TestDevice是个类型,下面看这个类型定义了什么内容。

 问题1:看TestDevice发现,它是实现的DeviceObserver,这样的话相互之间不会产生相互依赖吗?

TestDevice,是个测试目标设备的管理类,包括三个功能,1.安装卸载测试包。2.在设备上执行命令,3.获得命令执行结果回显。

 这个类1866行,有工作的管理机制, 多线程, 等等等等。(这部分内容稍后说明)

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(学习,提高)