TfTestLauncher
public
class
TfTestLauncher
extends SubprocessTfLauncher
| java.lang.Object | ||
| ↳ | com.android.tradefed.testtype.SubprocessTfLauncher | |
| ↳ | com.android.tradefed.testtype.TfTestLauncher | |
IRemoteTest,可針對個別 TF 安裝執行單元或功能測試。
啟動外部 Java 程序來執行測試。用於持續執行 TF 單元或功能測試。
摘要
公用建構函式 | |
|---|---|
TfTestLauncher()
|
|
受保護的方法 | |
|---|---|
void
|
addJavaArguments(List<String> args)
Allow to add extra java parameters to the subprocess invocation. |
void
|
postRun(ITestInvocationListener listener, boolean exception, long elapsedTime)
完成 TF 測試後應採取的行動。 |
void
|
preRun()
執行測試前請先完成設定。 |
void
|
testTmpDirClean(File tmpDir, ITestInvocationListener listener)
額外測試,確保單元測試不會在子程序中建立檔案,且不會清除檔案。 |
公用建構函式
TfTestLauncher
public TfTestLauncher ()
受保護的方法
addJavaArguments
protected void addJavaArguments (List<String> args)
允許在子程序呼叫中新增額外 Java 參數。
| 參數 | |
|---|---|
args |
List:目前的引數清單,我們需要新增額外引數。 |
postRun
protected void postRun (ITestInvocationListener listener, boolean exception, long elapsedTime)
完成 TF 測試後應採取的行動。
| 參數 | |
|---|---|
listener |
ITestInvocationListener:用來回報結果的原始 ITestInvocationListener。 |
exception |
boolean:如果測試中發生例外狀況,則為 True。 |
elapsedTime |
long:執行測試所花的時間。 |
preRun
protected void preRun ()
請先完成設定再執行測試。
testTmpDirClean
protected void testTmpDirClean (File tmpDir,
ITestInvocationListener listener)額外測試,確保單元測試不會在子程序中建立檔案,且不會清除檔案。
| 參數 | |
|---|---|
tmpDir |
File:子程序的暫時目錄。 |
listener |
ITestInvocationListener:要回報測試結果的ITestInvocationListener。 |