CtsTestLauncher
public
class
CtsTestLauncher
extends Object
implements
IBuildReceiver,
IConfigurationReceiver,
IDeviceTest,
IInvocationContextReceiver,
IMetricCollectorReceiver,
IRemoteTest,
IShardableTest
| java.lang.Object | |
| ↳ | com.google.android.tradefed.testtype.CtsTestLauncher |
別の CTS インストールに対してテストを実行するための IRemoteTest。
テストを実行する外部 java プロセスを起動します。ダウンロードした特定のバージョンの CTS とその構成を実行するために使用されます。起動した現在のバージョンの tradefed を使用して、不足している jar を補完します。
概要
パブリック コンストラクタ | |
|---|---|
CtsTestLauncher()
|
|
CtsTestLauncher(int shardCount, int shardIndex)
|
|
パブリック メソッド | |
|---|---|
String
|
buildClasspath()
サブプロセスが CTS を実行するために使用するクラスパスを作成します。 |
List<String>
|
buildJavaCmd(String classpath)
サブプロセスで実行される java コマンドラインを作成します。 |
String
|
getConfigName()
|
ITestDevice
|
getDevice()
テスト対象デバイスを取得します。 |
CommandResult
|
getResult()
|
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
テストを実行し、結果をリスナーに報告します。 |
void
|
setBuild(IBuildInfo buildInfo)
|
void
|
setConfigName(String config)
|
void
|
setConfiguration(IConfiguration configuration)
使用中の |
void
|
setCtsVersion(int version)
|
void
|
setDevice(ITestDevice device)
テスト対象デバイスを挿入します。 |
void
|
setInvocationContext(IInvocationContext invocationContext)
|
void
|
setMetricCollectors(List<IMetricCollector> collectors)
テスト実行用に定義された |
Collection<IRemoteTest>
|
split(int shardCountHint)
実行しようとした shardCount も提供する |
保護されたメソッド | |
|---|---|
IRunUtil
|
getRunUtil()
|
String
|
getSystemJava()
|
void
|
setRunAsRoot(boolean runAsRoot)
|
パブリック コンストラクタ
CtsTestLauncher
public CtsTestLauncher ()
CtsTestLauncher
public CtsTestLauncher (int shardCount,
int shardIndex)| パラメータ | |
|---|---|
shardCount |
int |
shardIndex |
int |
パブリック メソッド
buildClasspath
public String buildClasspath ()
サブプロセスが CTS を実行するために使用するクラスパスを作成します
| 戻り値 | |
|---|---|
String |
完全なクラスパスを含む文字列。 |
| 例外 | |
|---|---|
IOException |
|
buildJavaCmd
public List<String> buildJavaCmd (String classpath)
サブプロセスで実行される java コマンドラインを作成します。
| パラメータ | |
|---|---|
classpath |
String: CTS/XTS の実行に必要な jar ファイルへの java クラスパス |
| 戻り値 | |
|---|---|
List<String> |
java コマンドラインとパラメータを含む ArrayList |
| 例外 | |
|---|---|
DeviceNotAvailableException |
|
getConfigName
public String getConfigName ()
| 戻り値 | |
|---|---|
String |
|
run
public void run (TestInformation testInfo, ITestInvocationListener listener)
テストを実行し、結果をリスナーに報告します。
| パラメータ | |
|---|---|
testInfo |
TestInformation: テストの実行に役立つ情報を含む TestInformation オブジェクト。 |
listener |
ITestInvocationListener: テスト結果の ITestInvocationListener |
| 例外 | |
|---|---|
DeviceNotAvailableException |
|
setConfigName
public void setConfigName (String config)
| パラメータ | |
|---|---|
config |
String |
setConfiguration
public void setConfiguration (IConfiguration configuration)
使用中の IConfiguration を挿入します。
| パラメータ | |
|---|---|
configuration |
IConfiguration |
setCtsVersion
public void setCtsVersion (int version)
| パラメータ | |
|---|---|
version |
int |
setDevice
public void setDevice (ITestDevice device)
テスト対象デバイスを挿入します。
| パラメータ | |
|---|---|
device |
ITestDevice: 使用する ITestDevice |
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
| パラメータ | |
|---|---|
invocationContext |
IInvocationContext |
setMetricCollectors
public void setMetricCollectors (List<IMetricCollector> collectors)
テスト実行用に定義された IMetricCollector のリストを設定します。
| パラメータ | |
|---|---|
collectors |
List |
split
public Collection<IRemoteTest> split (int shardCountHint)
実行しようとした shardCount も提供する split() の代替バージョン。これは、テストランナーが任意に決定できない場合に便利です。
| パラメータ | |
|---|---|
shardCountHint |
int: 試行されたシャード数。 |
| 戻り値 | |
|---|---|
Collection<IRemoteTest> |
個別に実行されるサブテストのコレクション。テストが現在シャード可能でない場合は null |
保護されたメソッド
getSystemJava
protected String getSystemJava ()
| 戻り値 | |
|---|---|
String |
|
setRunAsRoot
protected void setRunAsRoot (boolean runAsRoot)
| パラメータ | |
|---|---|
runAsRoot |
boolean |