JsonHttpTestResultReporter
public class JsonHttpTestResultReporter
extends CollectingTestListener
Test ölçüm sonuçlarını ve dalı, cihaz bilgilerini JSON'a ve POST'u bir HTTP hizmeti uç noktasına kodlayan bir sonuç raporlayıcısı
Özet
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 kurucuları
JsonHttpTestResultReporter
public JsonHttpTestResultReporter ()
Herkese açık yöntemler
getValidMetrics
public getValidMetrics ( collectedMetrics)
Yalnızca sayısal metrikleri ekleyin ve sayısal olmayan metrikleri göndermeyi atlayın.
Parametreler |
---|
collectedMetrics | : tüm ölçümleri içerir. |
İadeler |
---|
| yalnızca sayısal metrikler. |
invocationEnded
public void invocationEnded (long elapsedTime)
Parametreler |
---|
elapsedTime | long |
invocationFailed
public void invocationFailed (Throwable cause)
Parametreler |
---|
cause | Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
Parametreler |
---|
context | IInvocationContext |
Korumalı yöntemler
getDevice
protected ITestDevice getDevice (IInvocationContext context)
Parametreler |
---|
context | IInvocationContext |
parseAdditionalDeviceDetails
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. |
postResults
protected void postResults (JSONObject postData)
Verileri belirtilen HTTP uç noktasına gönderin
Parametreler |
---|
postData | JSONObject : gönderilecek veriler |