分片助手

public class ShardHelper
extends Object implements IShardHelper

java.lang.Object
com.android.tradefed.invoker.shard.ShardHelper


處理建立分片並安排它們進行呼叫的幫助程式類別。

概括

領域

public static final String LAST_SHARD_DETECTOR

public static final String SHARED_TEST_INFORMATION

公共構造函數

ShardHelper ()

公共方法

boolean shardConfig ( IConfiguration config, TestInformation testInfo, IRescheduler rescheduler, ITestLogger logger)

嘗試將配置分割為子配置,以便重新安排在多個資源上並行運行。

受保護的方法

IGlobalConfiguration getGlobalConfiguration ()

傳回當前的全域配置。

void validateOptions ( TestInformation testInfo, IConfiguration config)

在配置上運行IConfiguration#validateOptions()

領域

LAST_SHARD_DETECTOR

public static final String LAST_SHARD_DETECTOR

SHARED_TEST_INFORMATION

public static final String SHARED_TEST_INFORMATION

公共構造函數

分片助手

public ShardHelper ()

公共方法

分片配置

public boolean shardConfig (IConfiguration config, 
                TestInformation testInfo, 
                IRescheduler rescheduler, 
                ITestLogger logger)

嘗試將配置分割為子配置,以便重新安排在多個資源上並行運行。

成功的分片操作會使目前配置為空,且呼叫不應繼續。

參數
config IConfiguration :目前的IConfiguration

testInfo TestInformation :儲存測試資訊的TestInformation

rescheduler IReschedulerIRescheduler

logger ITestLogger

退貨
boolean如果測試被分片則為 true。否則回傳false

也可以看看:

受保護的方法

取得全域配置

protected IGlobalConfiguration getGlobalConfiguration ()

傳回當前的全域配置。

退貨
IGlobalConfiguration

驗證選項

protected void validateOptions (TestInformation testInfo, 
                IConfiguration config)

在配置上運行IConfiguration#validateOptions()

參數
testInfo TestInformation

config IConfiguration