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)  | 
| 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) نسخه جایگزین  | |
سازندگان عمومی
InstalledInstrumentationsTest
public InstalledInstrumentationsTest ()
روش های عمومی
getDevice
public ITestDevice getDevice ()
دستگاه را تحت آزمایش قرار دهید.
| برمی گرداند | |
|---|---|
| ITestDevice | ITestDevice | 
اجرا کنید
public void run (TestInformation testInfo, ITestInvocationListener listener)
تست ها را اجرا می کند و نتیجه را به شنونده گزارش می دهد.
| پارامترها | |
|---|---|
| testInfo | TestInformation: شیTestInformationحاوی اطلاعات مفید برای اجرای تست ها. | 
| listener | ITestInvocationListener:ITestInvocationListenerنتایج آزمون | 
| پرتاب می کند | |
|---|---|
| DeviceNotAvailableException | |
پیکربندی set
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 | |
