測試池輪詢器
public final class TestsPoolPoller
extends Object
implements IRemoteTest , IConfigurationReceiver , ISystemStatusCheckerReceiver , IMetricCollectorReceiver
java.lang.Object | |
↳ | com.android.tradefed.invoker.shard.TestsPoolPoller |
測試包裝器允許執行測試池中的所有測試。測試可以由另一個TestsPoolPoller
共享,因此需要同步。
TODO:新增對令牌模組/測試的處理。
概括
公共構造函數 | |
---|---|
TestsPoolPoller ( ITestsPool testsPool, CountDownLatch tracker) 提供 |
公共方法 | |
---|---|
void | run ( TestInformation info, ITestInvocationListener listener) 運行測試,並將結果報告給偵聽器。 |
void | setConfiguration ( IConfiguration configuration) 注入正在使用的 |
void | setLogRegistry ( ILogRegistry registry) |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) 設定為測試運行定義的 |
void | setSystemStatusChecker ( systemCheckers) setSystemStatusChecker ( systemCheckers) 從測試配置設定 |
公共構造函數
測試池輪詢器
public TestsPoolPoller (ITestsPool testsPool, CountDownLatch tracker)
提供IRemoteTest
池的 Ctor。
參數 | |
---|---|
testsPool | ITestsPool : ITestsPool 所有測試的池子。 |
tracker | CountDownLatch :共用一個ERROR(/CountDownLatch) 以取得正在執行的輪詢器的數量。 |
公共方法
跑步
public void run (TestInformation info, ITestInvocationListener listener)
運行測試,並將結果報告給偵聽器。
參數 | |
---|---|
info | TestInformation : TestInformation 物件包含執行測試的有用資訊。 |
listener | ITestInvocationListener :測試結果的ITestInvocationListener |
投擲 | |
---|---|
DeviceNotAvailableException |
設定配置
public void setConfiguration (IConfiguration configuration)
注入正在使用的IConfiguration
。
參數 | |
---|---|
configuration | IConfiguration |
設定MetricCollectors
public void setMetricCollectors (collectors)
設定為測試運行定義的IMetricCollector
清單。
參數 | |
---|---|
collectors |
設定係統狀態檢查器
public void setSystemStatusChecker (systemCheckers)
從測試配置設定ISystemStatusChecker
。
參數 | |
---|---|
systemCheckers |