InstalledInstrumentationsTest

public class InstalledInstrumentationsTest
extends Object implements IAutoRetriableTest, IConfigurationReceiver, IDeviceTest, IMetricCollectorReceiver, IShardableTest

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)

تُستخدَم لضبط قائمة IMetricCollector المحدّدة لتشغيل الاختبار.

boolean shouldRetry(int attemptJustExecuted, previousResults, skipList)

تم تفويضها من 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() تقدّم أيضًا عدد الأجزاء التي تتم محاولة تشغيلها.

وظائف الإنشاء العامة

InstalledInstrumentationsTest

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 المحدّدة لتشغيل الاختبار.

المعلمات
collectors

shouldRetry

public boolean shouldRetry (int attemptJustExecuted, 
                 previousResults, 
                 skipList)

تم تفويضها من 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 للاختبار الذي تم إجراؤه للتو

skipList : مجموعة العناصر التي يجب عدم إعادة تجربتها

المرتجعات
boolean صحيح إذا كان علينا إعادة المحاولة، وخطأ في الحالات الأخرى.

عمليات الرمي
DeviceNotAvailableException

تقسيم

public  split (int shardCountHint)

نسخة بديلة من split() تقدّم أيضًا عدد الأجزاء التي تتم محاولة تشغيلها. ويُعدّ ذلك مفيدًا لبعض مشغّلات الاختبار التي لا يمكنها اتخاذ قرار عشوائي في بعض الأحيان.

المعلمات
shardCountHint int: عدد الشرائح التي تمّت محاولة إنشائها

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