JarHostTest.HostTestListener

public class JarHostTest.HostTestListener
extends ResultForwarder

java.lang.Object
com.android.tradefed.result.ResultForwarder
  com.android.compatibility.common.tradefed.testtype.JarHostTest.HostTestListener


Wrapper listener that forwards all events except testRunStarted() and testRunEnded() to the embedded listener. Each test class in the jar will invoke these events, which HostTestListener withholds from listeners for console logging and result reporting.

สรุป

เครื่องมือสร้างสาธารณะ

HostTestListener(ITestInvocationListener listener)

เมธอดสาธารณะ

void testRunEnded(long elapsedTime, Map<String, String> metrics)

void testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> metrics)

รายงานการสิ้นสุดการรันเพื่อทดสอบ

void testRunStarted(String name, int numTests)

รายงานการเริ่มต้นการรันเพื่อทดสอบ

เครื่องมือสร้างสาธารณะ

HostTestListener

public HostTestListener (ITestInvocationListener listener)

พารามิเตอร์
listener ITestInvocationListener

เมธอดสาธารณะ

testRunEnded

public void testRunEnded (long elapsedTime, 
                Map<String, String> metrics)

พารามิเตอร์
elapsedTime long

metrics Map

testRunEnded

public void testRunEnded (long elapsedTime, 
                HashMap<String, MetricMeasurement.Metric> metrics)

รายงานการสิ้นสุดการรันเพื่อทดสอบ FIXME: We cannot have two Map<> interfaces with different type, so we have to use HashMap here.

พารามิเตอร์
elapsedTime long: เวลาที่ผ่านไปที่อุปกรณ์รายงานเป็นมิลลิวินาที

metrics HashMap: คู่คีย์-ค่าที่รายงานเมื่อสิ้นสุดการรันเพื่อทดสอบด้วย Metric

testRunStarted

public void testRunStarted (String name, 
                int numTests)

รายงานการเริ่มต้นการรันเพื่อทดสอบ

พารามิเตอร์
name String: ชื่อการรันเพื่อทดสอบ

numTests int: จำนวนการทดสอบทั้งหมดในการรันเพื่อทดสอบ