تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.

الأجهزة المثبتةالاختبار

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)

IConfiguration رمز الرمز قيد الاستخدام.

void setDevice ( ITestDevice device)

احقن الجهاز قيد الاختبار.

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

يضبط قائمة IMetricCollector s المحددة للتشغيل التجريبي.

boolean shouldRetry (int attemptJustExecuted, previousResults) 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)) .

split (int shardCountHint)

إصدار بديل من Split split() والذي يوفر أيضًا ShardCount الذي تمت محاولة تشغيله.

المنشئون العامة

الأجهزة المثبتةالاختبار

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

ينقسم

public  split (int shardCountHint)

إصدار بديل من Split split() والذي يوفر أيضًا ShardCount الذي تمت محاولة تشغيله. هذا مفيد لبعض عداء الاختبار الذي لا يمكن أن يقرر بشكل تعسفي في بعض الأحيان.

المعلمات
shardCountHint int : محاولة عد الأجزاء.

عائدات
مجموعة من الاختبارات الفرعية يتم تنفيذها بشكل منفصل أو null إذا كان الاختبار غير قابل للتجزئة حاليًا