JsonHttpTestResultReporter
public
class
JsonHttpTestResultReporter
extends CollectingTestListener
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.CollectingTestListener | |
| ↳ | com.android.tradefed.result.JsonHttpTestResultReporter | |
테스트 측정항목 결과 및 브랜치, 기기 정보를 JSON으로 인코딩하고 HTTP 서비스 엔드포인트에 POST하는 결과 보고자
요약
공개 생성자 | |
|---|---|
JsonHttpTestResultReporter()
|
|
공개 메서드 | |
|---|---|
|
getValidMetrics(
숫자 측정항목만 추가하고 숫자가 아닌 측정항목은 게시하지 않습니다. |
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationFailed(Throwable cause)
|
void
|
invocationStarted(IInvocationContext context)
|
보호된 메서드 | |
|---|---|
ITestDevice
|
getDevice(IInvocationContext context)
|
void
|
parseAdditionalDeviceDetails(ITestDevice testDevice)
테스트 기기에서 기기 이름, SDK 버전 번호, 빌드 ID를 가져옵니다. |
void
|
postResults(JSONObject postData)
지정된 HTTP 엔드포인트에 데이터 게시 |
공개 생성자
JsonHttpTestResultReporter
public JsonHttpTestResultReporter ()
공개 메서드
getValidMetrics
publicgetValidMetrics ( collectedMetrics)
숫자 측정항목만 추가하고 숫자가 아닌 측정항목은 게시하지 않습니다.
| 매개변수 | |
|---|---|
collectedMetrics |
: 모든 측정항목을 포함합니다. |
| 반환 값 | |
|---|---|
|
숫자 측정항목만 |
invocationEnded
public void invocationEnded (long elapsedTime)
| 매개변수 | |
|---|---|
elapsedTime |
long |
invocationFailed
public void invocationFailed (Throwable cause)
| 매개변수 | |
|---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
| 매개변수 | |
|---|---|
context |
IInvocationContext |
보호된 메서드
getDevice
protected ITestDevice getDevice (IInvocationContext context)
| 매개변수 | |
|---|---|
context |
IInvocationContext |
| 반환 값 | |
|---|---|
ITestDevice |
|
parseAdditionalDeviceDetails
protected void parseAdditionalDeviceDetails (ITestDevice testDevice)
테스트 기기에서 기기 이름, SDK 버전 번호, 빌드 ID를 가져옵니다.
| 매개변수 | |
|---|---|
testDevice |
ITestDevice: 정보를 수집할 기기입니다.
|
postResults
protected void postResults (JSONObject postData)
지정된 HTTP 엔드포인트에 데이터 게시
| 매개변수 | |
|---|---|
postData |
JSONObject: 게시할 데이터
|