分片助手

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如果測試被分片則為真。否則返回false

也可以看看:

受保護的方法

獲取全局配置

protected IGlobalConfiguration getGlobalConfiguration ()

返回當前的全局配置。

退貨
IGlobalConfiguration

驗證選項

protected void validateOptions (TestInformation testInfo, 
                IConfiguration config)

在配置上運行IConfiguration#validateOptions()

參數
testInfo TestInformation

config IConfiguration