Trình báo cáo JsonHttpTestResult

public class JsonHttpTestResultReporter
extends CollectingTestListener

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


Trình báo cáo kết quả mã hóa kết quả và nhánh chỉ số kiểm tra, thông tin thiết bị thành JSON và POST thành điểm cuối dịch vụ HTTP

Bản tóm tắt

Nhà thầu xây dựng công cộng

JsonHttpTestResultReporter ()

Phương pháp công khai

getValidMetrics ( collectedMetrics) getValidMetrics ( collectedMetrics)

Chỉ thêm số liệu và bỏ qua việc đăng các số liệu không phải số.

void invocationEnded (long elapsedTime)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

Phương pháp được bảo vệ

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

Truy xuất tên thiết bị, số phiên bản sdk và id bản dựng từ thiết bị thử nghiệm.

void postResults (JSONObject postData)

Đăng dữ liệu lên điểm cuối HTTP được chỉ định

Nhà thầu xây dựng công cộng

Trình báo cáo JsonHttpTestResult

public JsonHttpTestResultReporter ()

Phương pháp công khai

getValidMetrics

public  getValidMetrics ( collectedMetrics)

Chỉ thêm số liệu và bỏ qua việc đăng các số liệu không phải số.

Thông số
collectedMetrics : chứa tất cả các số liệu.

Trả lại
chỉ có các số liệu số.

lời mờiĐã kết thúc

public void invocationEnded (long elapsedTime)

Thông số
elapsedTime long

lời gọi không thành công

public void invocationFailed (Throwable cause)

Thông số
cause Throwable

lời gọiBắt đầu

public void invocationStarted (IInvocationContext context)

Thông số
context IInvocationContext

Phương pháp được bảo vệ

lấy thiết bị

protected ITestDevice getDevice (IInvocationContext context)

Thông số
context IInvocationContext

Trả lại
ITestDevice

phân tíchThiết bị bổ sungChi tiết

protected void parseAdditionalDeviceDetails (ITestDevice testDevice)

Truy xuất tên thiết bị, số phiên bản sdk và id bản dựng từ thiết bị thử nghiệm.

Thông số
testDevice ITestDevice : thiết bị để thu thập thông tin từ đó.

bài đăngKết quả

protected void postResults (JSONObject postData)

Đăng dữ liệu lên điểm cuối HTTP được chỉ định

Thông số
postData JSONObject : dữ liệu được đăng