InstalledInstrumentationsTest

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

java.lang.Object
   ↳ com.android.tradefed.testtype.InstalledInstrumentationsTest


מריץ את כל המדידות שנמצאו במכשיר הנוכחי.

סיכום

‫constructors ציבוריים

InstalledInstrumentationsTest()

‫methods ציבוריים

ITestDevice getDevice()

משיגים את המכשיר שנבדק.

void run(TestInformation testInfo, ITestInvocationListener listener)

מריץ את הבדיקות ומדווח על התוצאה למאזין.

void setConfiguration(IConfiguration configuration)

הוספת ה-IConfiguration שנמצא בשימוש.

void setDevice(ITestDevice device)

מזריקים את המכשיר שנבדק.

void setMetricCollectors(List<IMetricCollector> collectors)

הגדרת רשימת IMetricCollectors שהוגדרו להרצת הבדיקה.

boolean shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)

הוענקה לך גישה על ידי IRetryDecision.shouldRetry(IRemoteTest,int,List).

Collection<IRemoteTest> split(int shardCountHint)

גרסה חלופית של split() שמספקת גם את shardCount שמנסים להפעיל.

‫constructors ציבוריים

InstalledInstrumentationsTest

public InstalledInstrumentationsTest ()

‫methods ציבוריים

getDevice

public ITestDevice getDevice ()

משיגים את המכשיר שנבדק.

החזרות
ITestDevice ‫ITestDevice

ראן

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

מריץ את הבדיקות ומדווח על התוצאה למאזין.

פרמטרים
testInfo ‫TestInformation: אובייקט TestInformation שמכיל מידע שימושי להרצת בדיקות.

listener ‫ITestInvocationListener: ITestInvocationListener תוצאות הבדיקה

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

הוספת ה-IConfiguration שנמצא בשימוש.

פרמטרים
configuration IConfiguration

setDevice

public void setDevice (ITestDevice device)

מזריקים את המכשיר שנבדק.

פרמטרים
device ‫ITestDevice: ITestDevice שבו רוצים להשתמש

setMetricCollectors

public void setMetricCollectors (List<IMetricCollector> collectors)

הגדרת רשימת IMetricCollectors שהוגדרו להרצת הבדיקה.

פרמטרים
collectors List

shouldRetry

public boolean shouldRetry (int attemptJustExecuted, 
                List<TestRunResult> previousResults, 
                Set<String> skipList)

הוענקה לך גישה על ידי IRetryDecision.shouldRetry(IRemoteTest,int,List). להחליט אם לנסות שוב או לא. בנוסף, מבצעים את השינויים הנדרשים ב-IRemoteTest כדי לנסות שוב (החלת מסננים, הכנת ההרצה הבאה וכו').

פרמטרים
attemptJustExecuted ‫int: מספר הניסיון שהרצנו.

previousResults ‫List: רשימת TestRunResult של הבדיקה שהופעלה.

skipList ‫Set: קבוצת הפריטים שלא כדאי לנסות לשלוח שוב.

החזרות
boolean הפונקציה מחזירה True אם צריך לנסות שוב, אחרת היא מחזירה False.

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException

פיצול

public Collection<IRemoteTest> split (int shardCountHint)

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

פרמטרים
shardCountHint ‫int: מספר הרסיסים שהמערכת ניסתה ליצור.

החזרות
Collection<IRemoteTest> אוסף של בדיקות משנה שצריך להריץ בנפרד או null אם אי אפשר לפצל את הבדיקה כרגע