透過集合功能整理內容
你可以依據偏好儲存及分類內容。
GTest
public
class
GTest
extends GTestBase
implements
IDeviceTest
在指定裝置上執行原生測試套件的測試。
摘要
保護方法 |
String
|
createFlagFile(String filter)
建立含有篩選器的檔案,該檔案將透過 --gtest_flagfile 使用,以避免發生作業系統
引數大小的限制
|
void
|
executeCommandByScript(ITestDevice testDevice, String cmd, IShellOutputReceiver resultParser)
此輔助方法可透過臨時指令碼執行 gtest 指令,若使用下列指令:
過長,無法直接透過 ADB 執行。
|
String
|
getGTestCmdLine(String fullPath, String flags)
用於建構要執行的 gtest 指令的輔助方法。
|
String
|
loadFilter(String binaryOnDevice)
定義 get 篩選方法。
|
boolean
|
shouldRunFile(String fullPath)
判斷我們是否應執行指定檔案的輔助方法。
|
公用建構函式
公用方法
isRebootBeforeTestEnabled
public boolean isRebootBeforeTestEnabled ()
setDevice
public void setDevice (ITestDevice device)
插入要測試的裝置。
setNativeTestDevicePath
public void setNativeTestDevicePath (String path)
保護方法
建立旗標檔案
protected String createFlagFile (String filter)
建立含有篩選器的檔案,該檔案將透過 --gtest_flagfile 使用,以避免發生作業系統
引數大小的限制
執行 CommandByScript
protected void executeCommandByScript (ITestDevice testDevice,
String cmd,
IShellOutputReceiver resultParser)
此輔助方法可透過臨時指令碼執行 gtest 指令,若使用下列指令:
過長,無法直接透過 ADB 執行。
參數 |
testDevice |
ITestDevice :要執行指令的裝置 |
cmd |
String :要執行的指令字串 |
resultParser |
IShellOutputReceiver :讀取測試結果的輸出接收器 |
getGTestCmdLine
protected String getGTestCmdLine (String fullPath,
String flags)
用於建構要執行的 gtest 指令的輔助方法。
參數 |
fullPath |
String :裝置上的 gtest 二進位檔絕對檔案系統路徑 |
flags |
String :Gtest 執行標記 |
傳回 |
String |
要執行 gtest 的殼層指令列 |
loadFilter
protected String loadFilter (String binaryOnDevice)
定義 get 篩選方法。
子類別必須實作如何取得自己的篩選器。
參數 |
binaryOnDevice |
String :篩選器檔案的完整路徑。 |
應執行檔案
protected boolean shouldRunFile (String fullPath)
判斷我們是否應執行指定檔案的輔助方法。
參數 |
fullPath |
String :相關檔案的完整路徑 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2024-08-29 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-08-29 (世界標準時間)。"],[],[]]