JsonHttpTestResultReporter

public class JsonHttpTestResultReporter
extends CollectingTestListener

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


Test ölçüm sonuçlarını kodlayan ve cihaz bilgilerini JSON'a ve POST'u bir HTTP hizmeti uç noktasına kodlayan bir sonuç raporlayıcısı

Özet

Kamu inşaatçıları

JsonHttpTestResultReporter ()

Genel yöntemler

getValidMetrics ( collectedMetrics) getValidMetrics ( collectedMetrics)

Yalnızca sayısal metrikleri ekleyin ve sayısal olmayan metrikleri yayınlamayı atlayın.

void invocationEnded (long elapsedTime)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

Korumalı yöntemler

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

Test cihazından cihaz adını, SDK sürüm numarasını ve yapı kimliğini alır.

void postResults (JSONObject postData)

Verileri belirtilen HTTP uç noktasına gönderin

Kamu inşaatçıları

JsonHttpTestResultReporter

public JsonHttpTestResultReporter ()

Genel yöntemler

getValidMetrics

public  getValidMetrics ( collectedMetrics)

Yalnızca sayısal metrikleri ekleyin ve sayısal olmayan metrikleri yayınlamayı atlayın.

Parametreler
collectedMetrics : tüm ölçümleri içerir.

İadeler
yalnızca sayısal ölçümler.

çağırma sona erdi

public void invocationEnded (long elapsedTime)

Parametreler
elapsedTime long

çağrı başarısız oldu

public void invocationFailed (Throwable cause)

Parametreler
cause Throwable

çağrı başlatıldı

public void invocationStarted (IInvocationContext context)

Parametreler
context IInvocationContext

Korumalı yöntemler

cihaz al

protected ITestDevice getDevice (IInvocationContext context)

Parametreler
context IInvocationContext

İadeler
ITestDevice

ayrıştırmaAdditionalDeviceDetails

protected void parseAdditionalDeviceDetails (ITestDevice testDevice)

Test cihazından cihaz adını, SDK sürüm numarasını ve yapı kimliğini alır.

Parametreler
testDevice ITestDevice : bilgilerin toplanacağı cihaz.

Sonuçları gönder

protected void postResults (JSONObject postData)

Verileri belirtilen HTTP uç noktasına gönderin

Parametreler
postData JSONObject : gönderilecek veriler