ShardHelper

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

公用建構函式

ShardHelper

public ShardHelper ()

公用方法

shardConfig

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

嘗試將設定分割成子設定,以便重新排程,在多個資源上並行執行。

成功的區塊動作會讓目前的設定呈現為空白,且不應繼續叫用。

參數
config IConfiguration:目前的 IConfiguration

testInfo TestInformation:儲存測試資訊的 TestInformation

rescheduler IReschedulerIRescheduler

logger ITestLogger

傳回
boolean 如果測試已分割,則為 true。否則傳回 false

另請參閱:

受保護的方法

getGlobalConfiguration

protected IGlobalConfiguration getGlobalConfiguration ()

傳回目前的全域設定。

傳回
IGlobalConfiguration

validateOptions

protected void validateOptions (TestInformation testInfo, 
                IConfiguration config)

在設定上執行 IConfiguration.validateOptions()

參數
testInfo TestInformation

config IConfiguration