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: تحدّد الاختبار |