TestsPoolPoller

public final class TestsPoolPoller
extends Object implements IConfigurationReceiver, IMetricCollectorReceiver, IRemoteTest, ISystemStatusCheckerReceiver

java.lang.Object
   ↳ com.android.tradefed.invoker.shard.TestsPoolPoller


測試包裝函式,可執行測試集的所有測試。測試可由其他 TestsPoolPoller 分享,因此需要同步處理。

TODO: Add handling for token module/tests.

摘要

公用建構函式

TestsPoolPoller(ITestsPool testsPool, CountDownLatch tracker)

提供 IRemoteTest 集區的 Ctor。

公用方法

void run(TestInformation info, ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

void setConfiguration(IConfiguration configuration)

注入使用的 IConfiguration

void setLogRegistry(ILogRegistry registry)
void setMetricCollectors(List<IMetricCollector> collectors)

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

void setSystemStatusChecker(List<ISystemStatusChecker> systemCheckers)

從測試的設定中設定 ISystemStatusChecker

公用建構函式

TestsPoolPoller

public TestsPoolPoller (ITestsPool testsPool, 
                CountDownLatch tracker)

提供 IRemoteTest 集區的 Ctor。

參數
testsPool ITestsPoolITestsPool 的所有測試集區。

tracker CountDownLatch:用來取得執行中輪詢器數量的 CountDownLatch

公用方法

得分

public void run (TestInformation info, 
                ITestInvocationListener listener)

執行測試,並向接聽程式回報結果。

參數
info TestInformation:包含執行測試實用資訊的 TestInformation 物件。

listener ITestInvocationListener:測試結果的 ITestInvocationListener

擲回
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

注入使用的 IConfiguration

參數
configuration IConfiguration

setLogRegistry

public void setLogRegistry (ILogRegistry registry)

參數
registry ILogRegistry

setMetricCollectors

public void setMetricCollectors (List<IMetricCollector> collectors)

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

參數
collectors List

setSystemStatusChecker

public void setSystemStatusChecker (List<ISystemStatusChecker> systemCheckers)

從測試的設定中設定 ISystemStatusChecker

參數
systemCheckers List