MoblyBinaryHostTest
public
class
MoblyBinaryHostTest
extends Object
implements
IBuildReceiver,
IDeviceTest,
IRemoteTest,
IShardableTest,
ITestFilterReceiver
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.mobly.MoblyBinaryHostTest |
主機測試:從 Android 建構系統 (Soong) 執行 mobly python 二進位檔
摘要
公用建構函式 | |
|---|---|
MoblyBinaryHostTest()
|
|
公用方法 | |
|---|---|
void
|
addAllExcludeFilters(
新增要排除的測試篩選器 |
void
|
addAllIncludeFilters(
新增要納入測試的篩選器 |
void
|
addExcludeFilter(String filter)
新增要排除的測試篩選器。 |
void
|
addIncludeFilter(String filter)
新增要納入的測試篩選條件。 |
void
|
clearExcludeFilters()
刪除目前追蹤的所有排除篩選器。 |
void
|
clearIncludeFilters()
刪除目前追蹤的所有包含篩選器。 |
ITestDevice
|
getDevice()
取得受測裝置。 |
|
getExcludeFilters()
傳回排除篩選器的目前 |
|
getIncludeFilters()
傳回包含篩選器的目前 |
final
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
Runs the tests, and reports result to the listener. |
void
|
setBuild(IBuildInfo buildInfo)
|
void
|
setDevice(ITestDevice device)
注入受測裝置。 |
|
split(int shardCountHint)
|
受保護的方法 | |
|---|---|
String[]
|
buildCommandLineArray(String filePath, String configPath,
|
String[]
|
buildCommandLineArray(String filePath, String configPath)
|
|
filterTests(String[] testListLines, String runName, ITestInvocationListener listener)
|
MoblyArtifactReporter
|
getArtifactReporter()
|
String
|
getLogDirAbsolutePath()
|
File
|
getLogDirFile()
|
boolean
|
processYamlTestResults(InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName)
Parses Mobly test results and does result reporting. |
void
|
updateConfigFile(InputStream configInputStream, Writer writer)
|
公用建構函式
MoblyBinaryHostTest
public MoblyBinaryHostTest ()
公用方法
addAllExcludeFilters
public void addAllExcludeFilters (filters)
新增要排除的測試篩選器 ERROR(/Set)。
| 參數 | |
|---|---|
filters |
|
addAllIncludeFilters
public void addAllIncludeFilters (filters)
新增要納入測試的篩選器 ERROR(/Set)。
| 參數 | |
|---|---|
filters |
|
addExcludeFilter
public void addExcludeFilter (String filter)
新增要排除的測試篩選器。
| 參數 | |
|---|---|
filter |
String |
addIncludeFilter
public void addIncludeFilter (String filter)
新增要納入的測試篩選條件。
| 參數 | |
|---|---|
filter |
String |
clearExcludeFilters
public void clearExcludeFilters ()
刪除目前追蹤的所有排除篩選器。
clearIncludeFilters
public void clearIncludeFilters ()
刪除目前追蹤的所有包含篩選器。
得分
public final void run (TestInformation testInfo, ITestInvocationListener listener)
執行測試,並向接聽程式回報結果。
| 參數 | |
|---|---|
testInfo |
TestInformation:包含執行測試的實用資訊的 TestInformation 物件。 |
listener |
ITestInvocationListener:測試結果的 ITestInvocationListener |
拆分
publicsplit (int shardCountHint)
split() 的替代版本,也會提供嘗試執行的 shardCount。這項功能適用於有時無法任意決定的測試執行器。
| 參數 | |
|---|---|
shardCountHint |
int:嘗試的 Shard 數量。 |
| 傳回 | |
|---|---|
|
要個別執行的子測試集合,或測試目前無法分片時的 null |
受保護的方法
buildCommandLineArray
protected String[] buildCommandLineArray (String filePath,
String configPath,
tests) | 參數 | |
|---|---|
filePath |
String |
configPath |
String |
tests |
|
| 傳回 | |
|---|---|
String[] |
|
buildCommandLineArray
protected String[] buildCommandLineArray (String filePath,
String configPath)| 參數 | |
|---|---|
filePath |
String |
configPath |
String |
| 傳回 | |
|---|---|
String[] |
|
filterTests
protectedfilterTests (String[] testListLines, String runName, ITestInvocationListener listener)
| 參數 | |
|---|---|
testListLines |
String |
runName |
String |
listener |
ITestInvocationListener |
| 傳回 | |
|---|---|
|
|
getLogDirAbsolutePath
protected String getLogDirAbsolutePath ()
| 傳回 | |
|---|---|
String |
|
getLogDirFile
protected File getLogDirFile ()
| 傳回 | |
|---|---|
File |
|
processYamlTestResults
protected boolean processYamlTestResults (InputStream inputStream,
MoblyYamlResultParser parser,
ITestInvocationListener listener,
String runName)剖析 Mobly 測試結果,並回報結果。
| 參數 | |
|---|---|
inputStream |
InputStream:讀取 Mobly 測試結果檔案的 InputStream 物件。 |
parser |
MoblyYamlResultParser:處理 Mobly 測試結果的 MoblyYamlResultParser 物件。 |
listener |
ITestInvocationListener:ITestInvocationListener 執行個體,可執行各種報表作業。 |
runName |
String:str,執行的 Mobly 測試二進位檔名稱。 |
| 傳回 | |
|---|---|
boolean |
|
updateConfigFile
protected void updateConfigFile (InputStream configInputStream,
Writer writer)| 參數 | |
|---|---|
configInputStream |
InputStream |
writer |
Writer |
| 擲回 | |
|---|---|
HarnessRuntimeException |
|