SubprocessTfLauncher
public
abstract
class
SubprocessTfLauncher
extends Object
implements
IBuildReceiver,
IConfigurationReceiver,
IInvocationContextReceiver,
IRemoteTest
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.SubprocessTfLauncher |
別の TF インストールに対してテストを実行するための IRemoteTest。
テストを実行する外部 java プロセスを起動します。TF の単体テストまたは機能テストを継続的に実行するために使用されます。
概要
定数 | |
|---|---|
String |
ANDROID_SERIAL_VAR
Env. |
String |
PARENT_PROC_TAG_NAME
|
String |
SUBPROCESS_TAG_NAME
TF サブプロセスに渡されて区別されるタグ |
フィールド | |
|---|---|
protected
IBuildInfo |
mBuildInfo
|
protected
|
mCmdArgs
|
protected
IConfiguration |
mConfig
|
protected
String |
mRootDir
|
protected
IRunUtil |
mRunUtil
|
protected
File |
mTmpDir
|
パブリック コンストラクタ | |
|---|---|
SubprocessTfLauncher()
|
|
パブリック メソッド | |
|---|---|
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
テストを実行し、結果をリスナーに報告します。 |
void
|
setBuild(IBuildInfo buildInfo)
|
void
|
setConfiguration(IConfiguration configuration)
使用中の |
void
|
setInvocationContext(IInvocationContext invocationContext)
|
保護されたメソッド | |
|---|---|
void
|
addJavaArguments(
サブプロセス呼び出しに Java パラメータを追加できるようにします。 |
String
|
getJava()
|
IRunUtil
|
getRunUtil()
サブプロセス コマンドで使用される |
void
|
postRun(ITestInvocationListener listener, boolean exception, long elapsedTime)
TF テストの完了後に実行するアクション。 |
void
|
preRun()
テストを実行する前のセットアップ。 |
void
|
setEventStreaming(boolean eventStreaming)
use-event-streaming を設定します。 |
void
|
setProtoReporting(boolean protoReporting)
|
void
|
setRunUtil(IRunUtil runUtil)
IRunUtil を設定します。 |
定数
ANDROID_SERIAL_VAR
public static final String ANDROID_SERIAL_VAR
adb の選択に影響する環境変数。
定数値: "ANDROID_SERIAL"
PARENT_PROC_TAG_NAME
public static final String PARENT_PROC_TAG_NAME
定数値: "parentprocess"
SUBPROCESS_TAG_NAME
public static final String SUBPROCESS_TAG_NAME
TF サブプロセスに渡されて区別されるタグ
定数値: "subprocess"
フィールド
mCmdArgs
protectedmCmdArgs
mRootDir
protected String mRootDir
mTmpDir
protected File mTmpDir
パブリック コンストラクタ
SubprocessTfLauncher
public SubprocessTfLauncher ()
パブリック メソッド
ホームラン
public void run (TestInformation testInfo, ITestInvocationListener listener)
テストを実行し、結果をリスナーに報告します。
| パラメータ | |
|---|---|
testInfo |
TestInformation: テストの実行に役立つ情報を含む TestInformation オブジェクト。 |
listener |
ITestInvocationListener: テスト結果の ITestInvocationListener |
| 例外 | |
|---|---|
DeviceNotAvailableException |
|
setConfiguration
public void setConfiguration (IConfiguration configuration)
使用中の IConfiguration を挿入します。
| パラメータ | |
|---|---|
configuration |
IConfiguration |
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
| パラメータ | |
|---|---|
invocationContext |
IInvocationContext |
保護されたメソッド
addJavaArguments
protected void addJavaArguments (args)
サブプロセス呼び出しに余分な Java パラメータを追加できるようにします。
| パラメータ | |
|---|---|
args |
: 追加の引数を追加する必要がある引数の現在のリスト。 |
getJava
protected String getJava ()
| 戻り値 | |
|---|---|
String |
|
postRun
protected void postRun (ITestInvocationListener listener, boolean exception, long elapsedTime)
TF テストの完了後に実行するアクション。
| パラメータ | |
|---|---|
listener |
ITestInvocationListener: 結果を報告する元の ITestInvocationListener。 |
exception |
boolean: テスト内で例外が発生した場合は true。 |
elapsedTime |
long: テストの実行にかかった時間。 |
preRun
protected void preRun ()
テストを実行する前に設定します。
setEventStreaming
protected void setEventStreaming (boolean eventStreaming)
use-event-streaming を設定します。単体テスト用に公開されています。
| パラメータ | |
|---|---|
eventStreaming |
boolean |
setProtoReporting
protected void setProtoReporting (boolean protoReporting)
| パラメータ | |
|---|---|
protoReporting |
boolean |
setRunUtil
protected void setRunUtil (IRunUtil runUtil)
IRunUtil を設定します。単体テスト用に公開されています。
| パラメータ | |
|---|---|
runUtil |
IRunUtil |