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)

插入目前使用的 IConfiguration

void setDevice(ITestDevice device)

插入測試中的裝置。

void setMetricCollectors( collectors)

設定為測試執行作業定義的 IMetricCollector 清單。

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))

split(int shardCountHint)

split() 的替代版本,同時提供嘗試執行的區塊計數。

公用建構函式

InstalledInstrumentationsTest

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

shouldRetry

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 如果應重試,則傳回 True,否則傳回 False。

擲回
DeviceNotAvailableException

分割

public  split (int shardCountHint)

split() 的替代版本,同時提供嘗試執行的區塊計數。這對某些無法任意決定的測試執行程式相當實用。

參數
shardCountHint int:嘗試的分割區數量。

傳回
要個別執行的子測試集合,或如果測試目前無法分割,則為 null