FilteredResultForwarder
public
class
FilteredResultForwarder
extends ResultForwarder
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.ResultForwarder | |
| ↳ | com.android.tradefed.result.FilteredResultForwarder | |
รูปแบบของ ResultForwarder ที่อนุญาตเฉพาะรายการที่อนุญาตของ TestDescription เท่านั้นที่จะรายงานได้
สรุป
เครื่องมือสร้างสาธารณะ | |
|---|---|
FilteredResultForwarder(Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
|
|
เมธอดสาธารณะ | |
|---|---|
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
เรียกใช้เมื่อการทดสอบแบบอะตอมแจ้งว่ามีการสมมติเงื่อนไขที่เป็นเท็จ |
void
|
testAssumptionFailure(TestDescription test, String trace)
เรียกใช้เมื่อการทดสอบแบบอะตอมแจ้งว่ามีการสมมติเงื่อนไขที่เป็นเท็จ |
void
|
testEnded(TestDescription test, long endTime, Map<String, String> testMetrics)
|
void
|
testEnded(TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
ทางเลือกแทน |
void
|
testEnded(TestDescription test, Map<String, String> testMetrics)
|
void
|
testEnded(TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
รายงานจุดสิ้นสุดของการดำเนินการของกรณีทดสอบแต่ละรายการ |
void
|
testFailed(TestDescription test, FailureDescription failure)
รายงานความล้มเหลวของกรณีทดสอบแต่ละรายการ |
void
|
testFailed(TestDescription test, String trace)
รายงานความล้มเหลวของกรณีทดสอบแต่ละรายการ |
void
|
testIgnored(TestDescription test)
เรียกใช้เมื่อจะไม่ทำการทดสอบ โดยทั่วไปเนื่องจากมีการใส่คำอธิบายประกอบเมธอดทดสอบด้วย org.junit.Ignore |
void
|
testStarted(TestDescription test, long startTime)
ทางเลือกแทน |
void
|
testStarted(TestDescription test)
รายงานจุดเริ่มต้นของกรณีทดสอบแต่ละรายการ |
เครื่องมือสร้างสาธารณะ
FilteredResultForwarder
public FilteredResultForwarder (Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
| พารามิเตอร์ | |
|---|---|
allowedTests |
Collection |
listeners |
ITestInvocationListener |
เมธอดสาธารณะ
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
เรียกใช้เมื่อการทดสอบแบบอะตอมแจ้งว่ามีการสมมติเงื่อนไขที่เป็นเท็จ
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
failure |
FailureDescription: FailureDescription อธิบายความล้มเหลวและบริบทของความล้มเหลวนั้น |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
เรียกใช้เมื่อการทดสอบแบบอะตอมแจ้งว่ามีการสมมติเงื่อนไขที่เป็นเท็จ
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
trace |
String: สแต็กเทรซของความล้มเหลว |
testEnded
public void testEnded (TestDescription test, long endTime, Map<String, String> testMetrics)
| พารามิเตอร์ | |
|---|---|
test |
TestDescription |
endTime |
long |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
ทางเลือกแทน testEnded(TestDescription,Map) ซึ่งเราสามารถระบุเวลาสิ้นสุด
ได้โดยตรง รวมกับ testStarted(TestDescription,long) เพื่อการวัดที่แม่นยำ
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
endTime |
long: เวลาที่การทดสอบสิ้นสุดลง ซึ่งวัดผ่าน System.currentTimeMillis() |
testMetrics |
HashMap: Map ของเมตริกที่ปล่อยออกมา |
testEnded
public void testEnded (TestDescription test, Map<String, String> testMetrics)
| พารามิเตอร์ | |
|---|---|
test |
TestDescription |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
รายงานจุดสิ้นสุดของการดำเนินการของกรณีทดสอบแต่ละรายการ
หากไม่ได้เรียกใช้ testFailed(TestDescription, FailureDescription) การทดสอบนี้จะผ่าน นอกจากนี้ยังแสดงผลเมตริกคีย์/ค่า
ที่อาจมีการปล่อยออกมาในระหว่างการดำเนินการของกรณีทดสอบด้วย
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
testMetrics |
HashMap: Map ของเมตริกที่ปล่อยออกมา |
testFailed
public void testFailed (TestDescription test, FailureDescription failure)
รายงานความล้มเหลวของกรณีทดสอบแต่ละรายการ
จะเรียกใช้ระหว่าง testStarted และ testEnded
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
failure |
FailureDescription: FailureDescription อธิบายความล้มเหลวและบริบทของความล้มเหลวนั้น |
testFailed
public void testFailed (TestDescription test, String trace)
รายงานความล้มเหลวของกรณีทดสอบแต่ละรายการ
จะเรียกใช้ระหว่าง testStarted และ testEnded
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
trace |
String: สแต็กเทรซของความล้มเหลว |
testIgnored
public void testIgnored (TestDescription test)
เรียกใช้เมื่อจะไม่ทำการทดสอบ โดยทั่วไปเนื่องจากมีการใส่คำอธิบายประกอบเมธอดทดสอบด้วย org.junit.Ignore
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
testStarted
public void testStarted (TestDescription test, long startTime)
ทางเลือกแทน testStarted(TestDescription) ซึ่งเรายังระบุเวลาที่เริ่มการทดสอบ
ร่วมกับ testEnded(TestDescription,long,Map) เพื่อการวัดที่แม่นยำ
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |
startTime |
long: เวลาที่การทดสอบเริ่มต้น วัดผ่าน System.currentTimeMillis() |
testStarted
public void testStarted (TestDescription test)
รายงานจุดเริ่มต้นของกรณีทดสอบแต่ละรายการ อินเทอร์เฟซรุ่นเก่าควรใช้ testStarted(TestDescription) เมื่อเป็นไปได้
| พารามิเตอร์ | |
|---|---|
test |
TestDescription: ระบุการทดสอบ |