اختبار الأدوات المثبتة
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, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) |
split (int shardCountHint) إصدار بديل من |
المقاولين العامة
اختبار الأدوات المثبتة
public InstalledInstrumentationsTest ()
الأساليب العامة
com.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 |
يجب إعادة المحاولة
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 |
ينقسم
publicsplit (int shardCountHint)
إصدار بديل من split()
والذي يوفر أيضًا shardCount الذي تتم محاولة تشغيله. يعد هذا مفيدًا لبعض عداء الاختبار الذي لا يمكنه اتخاذ القرار بشكل تعسفي في بعض الأحيان.
حدود | |
---|---|
shardCountHint | int : محاولة حساب عدد القطع. |
عائدات | |
---|---|
مجموعة من الاختبارات الفرعية التي سيتم تنفيذها بشكل منفصل أو null إذا لم يكن الاختبار قابلاً للتجزئة حاليًا |