AndroidJUnitTest
public class AndroidJUnitTest
extends InstrumentationTest
implements IRuntimeHintProvider , ITestFileFilterReceiver , ITestFilterReceiver , ITestAnnotationFilterReceiver , IShardableTest
java.lang.Object | ||
↳ | com.android.tradefed.testtype.InstrumentationTest | |
↳ | com.android.tradefed.testtype.AndroidJUnitTest |
اختبار يقوم بتشغيل حزمة اختبار الأجهزة على جهاز معين باستخدام android.support.test.runner.AndroidJUnitRunner.
ملخص
مجالات | |
---|---|
public static final String | EXCLUDE_COLLECTOR_FILTER_KEY |
public static final String | INCLUDE_COLLECTOR_FILTER_KEY خيارات من مكتبة مساعد جانب المجمع. |
public static final String | NEW_RUN_LISTENER_ORDER_KEY وسيطة عداء اختبار الأجهزة المستخدمة لتمكين ترتيب |
public static final String | USE_TEST_STORAGE_SERVICE
|
المنشأت العامة | |
---|---|
AndroidJUnitTest () |
الأساليب العامة | |
---|---|
void | addAllExcludeAnnotation ( excludeAnnotations) addAllExcludeAnnotation ( excludeAnnotations) يضيف |
void | addAllExcludeFilters ( filters) addAllExcludeFilters ( filters) يضيف |
void | addAllIncludeAnnotation ( annotations) addAllIncludeAnnotation ( annotations) يضيف |
void | addAllIncludeFilters ( filters) addAllIncludeFilters ( filters) يضيف |
void | addExcludeAnnotation (String excludeAnnotation) يضيف تعليقًا توضيحيًا لاستبعاده إذا تم تمييز الاختبارات به. |
void | addExcludeFilter (String filter) يضيف عامل تصفية للاختبارات المراد استبعادها. |
void | addIncludeAnnotation (String annotation) يضيف تعليقًا توضيحيًا لتضمينه إذا تم تمييز الاختبارات به. |
void | addIncludeFilter (String filter) يضيف مرشحًا للاختبارات المراد تضمينها. |
void | clearExcludeAnnotations () احذف جميع التعليقات التوضيحية المستبعدة التي يتم تتبعها حاليًا. |
void | clearExcludeFilters () احذف جميع عوامل تصفية الاستبعاد المتعقبة حاليًا. |
void | clearIncludeAnnotations () احذف جميع تعليقات التضمين المتعقبة حاليًا. |
void | clearIncludeFilters () احذف جميع عوامل التضمين المتعقبة حاليًا. |
getExcludeAnnotations () إرجاع | |
getExcludeFilters () تُرجع | |
File | getExcludeTestFile () إرجاع الملف الذي يحتوي على الاختبارات المستبعدة. |
getIncludeAnnotations () إرجاع | |
getIncludeFilters () إرجاع | |
File | getIncludeTestFile () إرجاع الملف الذي يحتوي على الاختبارات المضمنة. |
long | getRuntimeHint () قم بإرجاع وقت التشغيل المتوقع للاختبار بالمللي ثانية. |
boolean | isClassOrMethod (String filter) العودة إذا كانت السلسلة هي اسم فئة أو طريقة. |
boolean | isRegex (String filter) العودة إذا كانت السلسلة عبارة عن regex للتصفية. |
void | run ( TestInformation testInfo, ITestInvocationListener listener) يجري الاختبارات ، ويبلغ نتائجها للمستمع. |
void | setExcludeTestFile (File testFile) يضبط ملف الاختبار للاستثناءات. |
void | setIncludeTestFile (File testFile) يعيّن ملف اختبار التضمينات. |
split (int shardCount) إصدار بديل من |
الطرق المحمية | |
---|---|
void | setRunnerArgs (IRemoteAndroidTestRunner runner)
|
مجالات
EXCLUDE_COLLECTOR_FILTER_KEY
public static final String EXCLUDE_COLLECTOR_FILTER_KEY
INCLUDE_COLLECTOR_FILTER_KEY
public static final String INCLUDE_COLLECTOR_FILTER_KEY
خيارات من مكتبة مساعد جانب المجمع.
NEW_RUN_LISTENER_ORDER_KEY
public static final String NEW_RUN_LISTENER_ORDER_KEY
وسيطة عداء اختبار الأجهزة المستخدمة لتمكين ترتيب RunListener
الجديد على جانب الجهاز.
USE_TEST_STORAGE_SERVICE
public static final String USE_TEST_STORAGE_SERVICE
المنشأت العامة
AndroidJUnitTest
public AndroidJUnitTest ()
الأساليب العامة
addAllExcludeAnnotation
public void addAllExcludeAnnotation (excludeAnnotations)
يضيف ERROR(/Set)
من التعليقات التوضيحية لاستبعاد الاختبار إذا تم تمييزه به.
حدود | |
---|---|
excludeAnnotations |
addAllExcludeFilters
public void addAllExcludeFilters (filters)
يضيف ERROR(/Set)
عوامل التصفية التي سيتم استبعاد الاختبارات الخاصة بها.
حدود | |
---|---|
filters |
addAllIncludeAnnotation. إضافة الكل
public void addAllIncludeAnnotation (annotations)
يضيف ERROR(/Set)
من التعليقات التوضيحية لتضمينها إذا تم تمييز الاختبارات بها.
حدود | |
---|---|
annotations |
addAllIncludeFilters
public void addAllIncludeFilters (filters)
يضيف ERROR(/Set)
عوامل التصفية التي يجب تضمين الاختبارات الخاصة بها.
حدود | |
---|---|
filters |
addExcludeAnnotation. إضافة تعليق
public void addExcludeAnnotation (String excludeAnnotation)
يضيف تعليقًا توضيحيًا لاستبعاده إذا تم تمييز الاختبارات به.
حدود | |
---|---|
excludeAnnotation | String |
addExcludeFilter
public void addExcludeFilter (String filter)
يضيف عامل تصفية للاختبارات المراد استبعادها.
حدود | |
---|---|
filter | String |
addInclude تعليق
public void addIncludeAnnotation (String annotation)
يضيف تعليقًا توضيحيًا لتضمينه إذا تم تمييز الاختبارات به.
حدود | |
---|---|
annotation | String |
addIncludeFilter
public void addIncludeFilter (String filter)
يضيف مرشحًا للاختبارات المراد تضمينها.
حدود | |
---|---|
filter | String |
clearExcludeAnnotations
public void clearExcludeAnnotations ()
احذف جميع التعليقات التوضيحية المستبعدة التي يتم تتبعها حاليًا.
clearExcludeFilters
public void clearExcludeFilters ()
احذف جميع عوامل تصفية الاستبعاد المتعقبة حاليًا.
clearInclude الشروح
public void clearIncludeAnnotations ()
احذف جميع تعليقات التضمين المتعقبة حاليًا.
قم بتضمين الفلاتر
public void clearIncludeFilters ()
احذف جميع عوامل التضمين المتعقبة حاليًا.
getExcludeAnnotations
publicgetExcludeAnnotations ()
إرجاع ERROR(/Set)
الحالي للتعليقات التوضيحية لاستبعادها.
عائدات | |
---|---|
getExcludeFilters
publicgetExcludeFilters ()
تُرجع ERROR(/Set)
الحالي لعوامل تصفية الاستبعاد.
عائدات | |
---|---|
getExcludeTestFile
public File getExcludeTestFile ()
إرجاع الملف الذي يحتوي على الاختبارات المستبعدة.
عائدات | |
---|---|
File |
getIncludeAnnotations
publicgetIncludeAnnotations ()
إرجاع ERROR(/Set)
الحالي للتعليقات التوضيحية لتضمينها.
عائدات | |
---|---|
getIncludeTestFile
public File getIncludeTestFile ()
إرجاع الملف الذي يحتوي على الاختبارات المضمنة.
عائدات | |
---|---|
File |
getRuntimeHint
public long getRuntimeHint ()
قم بإرجاع وقت التشغيل المتوقع للاختبار بالمللي ثانية. يتم استخدام الوقت لتحميل تنفيذ الرصيد المقسم
عائدات | |
---|---|
long |
isClassOrMethod
public boolean isClassOrMethod (String filter)
العودة إذا كانت السلسلة هي اسم فئة أو طريقة.
حدود | |
---|---|
filter | String |
عائدات | |
---|---|
boolean |
هو ريجكس
public boolean isRegex (String filter)
العودة إذا كانت السلسلة عبارة عن regex للتصفية.
حدود | |
---|---|
filter | String |
عائدات | |
---|---|
boolean |
يجري
public void run (TestInformation testInfo, ITestInvocationListener listener)
يجري الاختبارات ، ويبلغ نتائجها للمستمع.
حدود | |
---|---|
testInfo | TestInformation : يحتوي كائن TestInformation على معلومات مفيدة لتشغيل الاختبارات. |
listener | ITestInvocationListener : ITestInvocationListener لنتائج الاختبار |
رميات | |
---|---|
DeviceNotAvailableException |
setExcludeTestFile
public void setExcludeTestFile (File testFile)
يضبط ملف الاختبار للاستثناءات. لا يضمن وجود testFile أو أنه ملف.
حدود | |
---|---|
testFile | File |
setIncludeTestFile
public void setIncludeTestFile (File testFile)
يعيّن ملف اختبار التضمينات. لا يضمن وجود testFile أو أنه ملف.
حدود | |
---|---|
testFile | File |
ينقسم
publicsplit (int shardCount)
إصدار بديل من split()
والذي يوفر أيضًا ShardCount الذي تمت محاولة تشغيله. هذا مفيد لبعض عداء الاختبار الذي لا يمكن أن يقرر بشكل تعسفي في بعض الأحيان.
حدود | |
---|---|
shardCount | int : محاولة عد الأجزاء. |
عائدات | |
---|---|
مجموعة من الاختبارات الفرعية يتم تنفيذها بشكل منفصل أو null إذا كان الاختبار غير قابل للتجزئة حاليًا |
الطرق المحمية
setRunnerArgs
protected void setRunnerArgs (IRemoteAndroidTestRunner runner)
حدود | |
---|---|
runner | IRemoteAndroidTestRunner |