מבחן מכשירים מותקן

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 שהוגדרו להפעלת המבחן.

boolean shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) 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() המספקת גם את ה-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 שהוגדרו להפעלת המבחן.

פרמטרים
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

לְפַצֵל

public  split (int shardCountHint)

גרסה חלופית של split() המספקת גם את ה-shardCount שמנסה להפעיל. זה שימושי עבור רץ מבחן שאינו יכול להחליט באופן שרירותי לפעמים.

פרמטרים
shardCountHint int : ספירת הרסיסים הניסיונות.

החזרות
אוסף של בדיקות משנה שיבוצעו בנפרד או null אם הבדיקה אינה ניתנת כעת לחלוקה