AndroidBuildResultReporter

public class AndroidBuildResultReporter
extends CollectingTestListener implements ITestSummaryListener

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.google.android.tradefed.result.AndroidBuildResultReporter


向 Android Build API 报告测试结果。

摘要

常量

String STATUS_ERROR

String STATUS_FAIL

String STATUS_IN_PROGRESS

String STATUS_PASS

公共构造函数

AndroidBuildResultReporter()

公共方法

void invocationEnded(long elapsedTime)

报告调用已终止,无论是成功终止还是因某些错误情况而终止。

void invocationFailed(Throwable cause)

报告因某些错误情况而导致的不完整调用。

void invocationStarted(IInvocationContext context)

报告测试调用的开始。

void putSummary(List<TestSummary> summaries)

传递一个非 null TestSummaryList,该 List 可能来自作为配置一部分实例化的任何 ITestInvocationListener

常量

STATUS_ERROR

public static final String STATUS_ERROR

常量值: "error"

STATUS_FAIL

public static final String STATUS_FAIL

常量值: "completeFail"

STATUS_IN_PROGRESS

public static final String STATUS_IN_PROGRESS

常量值: “inProgress”

STATUS_PASS

public static final String STATUS_PASS

常量值: "completePass"

公共构造函数

AndroidBuildResultReporter

public AndroidBuildResultReporter ()

公共方法

invocationEnded

public void invocationEnded (long elapsedTime)

报告调用已终止,无论是成功终止还是因某些错误情况而终止。

将由 TradeFederation 框架自动调用。

参数
elapsedTime long:调用的已用时间(以毫秒为单位)

invocationFailed

public void invocationFailed (Throwable cause)

报告因某些错误情况而导致的不完整调用。

将由 TradeFederation 框架自动调用。

参数
cause Throwable:失败的 Throwable 原因

invocationStarted

public void invocationStarted (IInvocationContext context)

报告测试调用的开始。

将由 TradeFederation 框架自动调用。报告者需要替换此方法才能支持多设备报告。

参数
context IInvocationContext:有关调用的信息

putSummary

public void putSummary (List<TestSummary> summaries)

传递一个非 null TestSummaryList,该 List 可能已从作为配置一部分实例化的任何 ITestInvocationListener 返回。

参数
summaries List:当前配置中 ITestInvocationListener 的非 null TestSummaryList