SubprocessTfLauncher
public
abstract
class
SubprocessTfLauncher
extends Object
implements
IBuildReceiver,
IInvocationContextReceiver,
IRemoteTest,
IConfigurationReceiver
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.SubprocessTfLauncher |
針對個別 TF 安裝作業執行測試的 IRemoteTest。
啟動外部 Java 程序來執行測試。用於持續執行 TF 單元或功能測試。
摘要
欄位 | |
|---|---|
public
static
final
String |
ANDROID_SERIAL_VAR
Env. |
public
static
final
String |
PARENT_PROC_TAG_NAME
|
public
static
final
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 參數。 |
IRunUtil
|
getRunUtil()
會傳回將用於子程序指令的 |
void
|
postRun(ITestInvocationListener listener, boolean exception, long elapsedTime)
完成 TF 測試後要採取的動作。 |
void
|
preRun()
執行測試前進行設定。 |
void
|
setEventStreaming(boolean eventStreaming)
設定 use-event-streaming。 |
void
|
setRunUtil(IRunUtil runUtil)
設定 IRunUtil。 |
欄位
ANDROID_SERIAL_VAR
public static final String ANDROID_SERIAL_VAR
會影響 ADB 選取的環境變數。
PARENT_PROC_TAG_NAME
public static final String PARENT_PROC_TAG_NAME
SUBPROCESS_TAG_NAME
public static final String SUBPROCESS_TAG_NAME
這個標記會傳遞至 TF 子程序,用於區分
mBuildInfo
protected IBuildInfo mBuildInfo
mCmdArgs
protectedmCmdArgs
mRootDir
protected String mRootDir
mRunUtil
protected IRunUtil mRunUtil
mTmpDir
protected File mTmpDir
公用建構函式
SubprocessTfLauncher
public SubprocessTfLauncher ()
公用方法
得分
public void run (TestInformation testInfo,
ITestInvocationListener listener)
| 參數 | |
|---|---|
testInfo |
TestInformation |
listener |
ITestInvocationListener |
| 擲回 | |
|---|---|
DeviceNotAvailableException |
|
setBuild
public void setBuild (IBuildInfo buildInfo)
| 參數 | |
|---|---|
buildInfo |
IBuildInfo |
setConfiguration
public void setConfiguration (IConfiguration configuration)
插入正在使用的 IConfiguration。
| 參數 | |
|---|---|
configuration |
IConfiguration |
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
| 參數 | |
|---|---|
invocationContext |
IInvocationContext |
受保護的方法
addJavaArguments
protected void addJavaArguments (args)
允許在子程序叫用中加入額外的 Java 參數。
| 參數 | |
|---|---|
args |
:需要新增額外引數的目前引數清單。 |
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 |
setRunUtil
protected void setRunUtil (IRunUtil runUtil)
設定 IRunUtil。 公開供單元測試使用。
| 參數 | |
|---|---|
runUtil |
IRunUtil |