FilteredResultForwarder

public class FilteredResultForwarder
extends ResultForwarder

شیء جاوا
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)

جایگزینی برای testEnded(TestDescription,Map) که در آن می‌توانیم زمان پایان را مستقیماً مشخص کنیم.

void testEnded ( TestDescription test, Map<String, String> testMetrics)
void testEnded ( TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)

پایان اجرای یک مورد آزمایشی (test case) را گزارش می‌دهد.

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)

جایگزینی برای testStarted(TestDescription) که در آن زمان شروع تست را نیز مشخص می‌کنیم، و برای اندازه‌گیری دقیق‌تر با testEnded(TestDescription,long,Map) ترکیب می‌شود.

void testStarted ( TestDescription test)

شروع یک مورد آزمایشی (test case) منفرد را گزارش می‌دهد.

سازندگان عمومی

FilteredResultForwarder

public FilteredResultForwarder (Collection<TestDescription> allowedTests, 
                ITestInvocationListener... listeners)

پارامترها
allowedTests Collection

listeners ITestInvocationListener

روش‌های عمومی

آزمون فرض شکست

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

زمانی فراخوانی می‌شود که یک آزمایش اتمی، شرطی را نادرست فرض کند.

پارامترها
test TestDescription : تست را مشخص می‌کند.

failure FailureDescription : FailureDescription خرابی و زمینه آن را توصیف می‌کند.

آزمون فرض شکست

public void testAssumptionFailure (TestDescription test, 
                String trace)

زمانی فراخوانی می‌شود که یک آزمایش اتمی، شرطی را نادرست فرض کند.

پارامترها
test TestDescription : تست را مشخص می‌کند.

trace String : ردپای پشته از خرابی

آزمون پایان یافت

public void testEnded (TestDescription test, 
                long endTime, 
                Map<String, String> testMetrics)

پارامترها
test TestDescription

endTime long

testMetrics Map

آزمون پایان یافت

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 از معیارهای منتشر شده

آزمون پایان یافت

public void testEnded (TestDescription test, 
                Map<String, String> testMetrics)

پارامترها
test TestDescription

testMetrics Map

آزمون پایان یافت

public void testEnded (TestDescription test, 
                HashMap<String, MetricMeasurement.Metric> testMetrics)

پایان اجرای یک مورد آزمایشی (test case) را گزارش می‌دهد.

اگر testFailed(TestDescription, FailureDescription) فراخوانی نشده باشد، این تست با موفقیت انجام شده است. همچنین هر معیار کلید/مقداری را که ممکن است در طول اجرای مورد تست منتشر شده باشد، برمی‌گرداند.

پارامترها
test TestDescription : تست را مشخص می‌کند.

testMetrics HashMap : Map از معیارهای منتشر شده

تست ناموفق

public void testFailed (TestDescription test, 
                FailureDescription failure)

گزارش شکست یک مورد آزمایشی منفرد را می‌دهد.

بین testStarted و testEnded فراخوانی خواهد شد.

پارامترها
test TestDescription : تست را مشخص می‌کند.

failure FailureDescription : FailureDescription خرابی و زمینه آن را توصیف می‌کند.

تست ناموفق

public void testFailed (TestDescription test, 
                String trace)

گزارش شکست یک مورد آزمایشی منفرد را می‌دهد.

بین testStarted و testEnded فراخوانی خواهد شد.

پارامترها
test TestDescription : تست را مشخص می‌کند.

trace String : ردپای پشته از خرابی

آزمون نادیده گرفته شد

public void testIgnored (TestDescription test)

زمانی فراخوانی می‌شود که یک تست اجرا نخواهد شد، عموماً به این دلیل که یک متد تست با org.junit.Ignore حاشیه‌نویسی شده است.

پارامترها
test TestDescription : تست را مشخص می‌کند.

تست شروع شد

public void testStarted (TestDescription test, 
                long startTime)

جایگزینی برای testStarted(TestDescription) که در آن زمان شروع تست را نیز مشخص می‌کنیم، و برای اندازه‌گیری دقیق‌تر با testEnded(TestDescription,long,Map) ترکیب می‌شود.

پارامترها
test TestDescription : تست را مشخص می‌کند.

startTime long : زمان شروع تست، که از طریق System.currentTimeMillis() اندازه‌گیری می‌شود.

تست شروع شد

public void testStarted (TestDescription test)

شروع یک مورد آزمایشی (test case) را گزارش می‌دهد. رابط‌های قدیمی‌تر، در صورت امکان باید testStarted(TestDescription) استفاده کنند.

پارامترها
test TestDescription : تست را مشخص می‌کند.