الأجهزة المثبتةالاختبار
public class InstalledInstrumentationsTest
extends Object
implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver
java.lang.Object | |
↳ | com.android.tradefed.testtype.InstalledInstrumentationsTest |
يشغل جميع الأجهزة الموجودة على الجهاز الحالي.
ملخص
المنشأت العامة | |
---|---|
InstalledInstrumentationsTest () |
الأساليب العامة | |
---|---|
ITestDevice | getDevice () احصل على الجهاز قيد الاختبار. |
void | run ( TestInformation testInfo, ITestInvocationListener listener) يجري الاختبارات ، ويبلغ نتائجها للمستمع. |
void | setConfiguration ( IConfiguration configuration) يُحقن رمز |
void | setDevice ( ITestDevice device) احقن الجهاز قيد الاختبار. |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) يضبط قائمة |
boolean | shouldRetry (int attemptJustExecuted, previousResults) shouldRetry (int attemptJustExecuted, previousResults) |
split (int shardCountHint) إصدار بديل من |
المنشأت العامة
الأجهزة المثبتةالاختبار
public InstalledInstrumentationsTest ()
الأساليب العامة
getDevice
public ITestDevice getDevice ()
احصل على الجهاز قيد الاختبار.
عائدات | |
---|---|
ITestDevice | ITestDevice |
يجري
public void run (TestInformation testInfo, ITestInvocationListener listener)
يجري الاختبارات ، ويبلغ نتائجها للمستمع.
حدود | |
---|---|
testInfo | TestInformation : يحتوي كائن TestInformation على معلومات مفيدة لتشغيل الاختبارات. |
listener | ITestInvocationListener : ITestInvocationListener لنتائج الاختبار |
رميات | |
---|---|
DeviceNotAvailableException |
setConfiguration
public void setConfiguration (IConfiguration configuration)
يُحقن رمز IConfiguration
قيد الاستخدام.
حدود | |
---|---|
configuration | IConfiguration |
setDevice
public void setDevice (ITestDevice device)
احقن الجهاز قيد الاختبار.
حدود | |
---|---|
device | ITestDevice : جهاز ITestDevice المطلوب استخدامه |
setMetricCollectors
public void setMetricCollectors (collectors)
يضبط قائمة IMetricCollector
s المحددة للتشغيل التجريبي.
حدود | |
---|---|
collectors |
يجب إعادة المحاولة
public boolean shouldRetry (int attemptJustExecuted,previousResults)
مفوض من ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List))
. قرر ما إذا كان يجب محاولة إعادة المحاولة أم لا. قم أيضًا بإجراء أي تغييرات ضرورية على IRemoteTest
لتتم إعادة المحاولة (تطبيق عوامل التصفية ، وإعداد التشغيل التالي ، وما إلى ذلك).
حدود | |
---|---|
attemptJustExecuted | int : رقم المحاولة التي أجريناها للتو. |
previousResults | TestRunResult للاختبار الذي تم تشغيله للتو. |
عائدات | |
---|---|
boolean | صحيح إذا أردنا إعادة المحاولة ، خطأ خلاف ذلك. |
رميات | |
---|---|
DeviceNotAvailableException |
ينقسم
publicsplit (int shardCountHint)
إصدار بديل من split()
والذي يوفر أيضًا ShardCount الذي تمت محاولة تشغيله. هذا مفيد لبعض عداء الاختبار الذي لا يمكن أن يقرر بشكل تعسفي في بعض الأحيان.
حدود | |
---|---|
shardCountHint | int : محاولة عد الأجزاء. |
عائدات | |
---|---|
مجموعة من الاختبارات الفرعية يتم تنفيذها بشكل منفصل أو null إذا كان الاختبار غير قابل للتجزئة حاليًا |