JsonHttpTestResultReporter

public class JsonHttpTestResultReporter
extends CollectingTestListener

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.result.JsonHttpTestResultReporter


將測試指標結果和分支版本、裝置資訊編碼為 JSON 和 POST 的結果回報器 連線至 HTTP 服務端點

摘要

公用建構函式

JsonHttpTestResultReporter()

公用方法

getValidMetrics( collectedMetrics)

請只新增數值指標,並略過發布非數值指標的步驟。

void invocationEnded(long elapsedTime)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

保護方法

ITestDevice getDevice(IInvocationContext context)
void parseAdditionalDeviceDetails(ITestDevice testDevice)

從 測試裝置。

void postResults(JSONObject postData)

將資料發布至指定的 HTTP 端點

公用建構函式

JsonHttpTestResultReporter

public JsonHttpTestResultReporter ()

公用方法

getValidMetrics

public  getValidMetrics ( collectedMetrics)

請只新增數值指標,並略過發布非數值指標的步驟。

參數
collectedMetrics :包含所有指標。

傳回
只有數值指標

已叫用

public void invocationEnded (long elapsedTime)

參數
elapsedTime long

叫用失敗

public void invocationFailed (Throwable cause)

參數
cause Throwable

叫用

public void invocationStarted (IInvocationContext context)

參數
context IInvocationContext

保護方法

getDevice

protected ITestDevice getDevice (IInvocationContext context)

參數
context IInvocationContext

傳回
ITestDevice

剖析其他裝置詳細資料

protected void parseAdditionalDeviceDetails (ITestDevice testDevice)

從 測試裝置。

參數
testDevice ITestDevice:要收集資訊的裝置。

postResults

protected void postResults (JSONObject postData)

將資料發布至指定的 HTTP 端點

參數
postData JSONObject:要張貼的資料