GranularRetriableTestWrapper.StartEndCollector

public class GranularRetriableTestWrapper.StartEndCollector
extends ResultAndLogForwarder

شیء جاوا
com.android.tradefed.result.ResultForwarder
com.android.tradefed.result.ResultAndLogForwarder
com.android.tradefed.testtype.suite.GranularRetriableTestWrapper.StartEndCollector


کمک‌کننده‌ی کلاس برای پیدا کردن شروع و پایان اجرای از دست رفته.

خلاصه

فیلدها

public TestDescription mCurrentTest

public boolean mRunEndedReported

public boolean mRunStartReported

public boolean mTestInProgress

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

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 testRunEnded (long elapsedTimeMillis, Map<String, String> runMetrics)
void testRunEnded (long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)

پایان اجرای آزمایش را گزارش می‌دهد.

void testRunStarted (String runName, int testCount)

شروع یک آزمایش را گزارش می‌دهد.

void testRunStarted (String runName, int testCount, int attemptNumber, long startTime)

شروع یک آزمایش را گزارش می‌دهد.

void testRunStarted (String runName, int testCount, int attemptNumber)

شروع یک آزمایش را گزارش می‌دهد.

void testStarted ( TestDescription test, long startTime)

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

void testStarted ( TestDescription test)

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

فیلدها

mCurrentTest

public TestDescription mCurrentTest

mRunEndedReported

public boolean mRunEndedReported

mRunStartگزارش شده

public boolean mRunStartReported

mTestInProgress

public boolean mTestInProgress

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

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

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 testRunEnded (long elapsedTimeMillis, 
                Map<String, String> runMetrics)

پارامترها
elapsedTimeMillis long

runMetrics Map

تست اجرا شده

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

پایان اجرای تست را گزارش می‌دهد. رفع مشکل: ما نمی‌توانیم دو رابط Map<> با انواع مختلف داشته باشیم، بنابراین باید از HashMap در اینجا استفاده کنیم.

پارامترها
elapsedTime long : زمان سپری شده گزارش شده توسط دستگاه، بر حسب میلی ثانیه

runMetrics HashMap : جفت‌های کلید-مقدار که در پایان اجرای تست با Metric گزارش می‌شوند.

تست شروع شد

public void testRunStarted (String runName, 
                int testCount)

شروع یک آزمایش را گزارش می‌دهد.

پارامترها
runName String : نام اجرای آزمایشی

testCount int : تعداد کل تست‌ها در اجرای تست

تست شروع شد

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)

شروع یک آزمایش را گزارش می‌دهد.

پارامترها
runName String : نام اجرای آزمایشی

testCount int : تعداد کل تست‌ها در اجرای تست

attemptNumber int : شماره ترتیب، که تلاش‌های مختلف یک runName را که چندین بار اجرا شده‌اند، مشخص می‌کند. شماره تلاش با اندیس ۰ اندیس‌گذاری شده است و باید هر بار که یک اجرای جدید اتفاق می‌افتد، افزایش یابد. به عنوان مثال، یک تست ۳ بار به صورت جزئی تکرار می‌شود، باید ۴ بار در کل تحت یک runName اجرا شود و شماره تلاش از ۰ تا ۳ است.

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

تست شروع شد

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)

شروع یک آزمایش را گزارش می‌دهد.

پارامترها
runName String : نام اجرای آزمایشی

testCount int : تعداد کل تست‌ها در اجرای تست

attemptNumber int : شماره ترتیب، که تلاش‌های مختلف یک runName را که چندین بار اجرا شده‌اند، مشخص می‌کند. شماره تلاش با اندیس ۰ اندیس‌گذاری شده است و باید هر بار که یک اجرای جدید اتفاق می‌افتد، افزایش یابد. به عنوان مثال، یک تست ۳ بار به صورت جزئی تکرار می‌شود، باید ۴ بار در کل تحت یک runName اجرا شود و شماره تلاش از ۰ تا ۳ است.

تست شروع شد

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 : تست را مشخص می‌کند.