IRemoteTest

public interface IRemoteTest

com.android.tradefed.testtype.IRemoteTest


一种直接向 ITestInvocationListener 报告结果的测试。

与 JUnit 相比,此方法具有以下优势。

  • 更轻松地报告在 Android 设备上远程运行的测试的结果,因为远程测试的结果无需从 JUnit 测试对象中进行不必要的序列化和反序列化。
  • 支持报告测试指标

摘要

公共方法

default void run(ITestInvocationListener listener)

此方法已弃用。 请改用 run(com.android.tradefed.invoker.TestInformation, com.android.tradefed.result.ITestInvocationListener)

default void run(TestInformation testInfo, ITestInvocationListener listener)

运行测试,并将结果报告给监听器。

公共方法

得分

public void run (ITestInvocationListener listener)

此方法已弃用。
请改用 run(com.android.tradefed.invoker.TestInformation, com.android.tradefed.result.ITestInvocationListener)

运行测试,并将结果报告给监听器。

参数
listener ITestInvocationListener:测试结果的 ITestInvocationListener

抛出
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

得分

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

运行测试,并将结果报告给监听器。

参数
testInfo TestInformation:包含用于运行测试的实用信息的 TestInformation 对象。

listener ITestInvocationListener:测试结果的 ITestInvocationListener

抛出
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException