MoblyBinaryHost测试
public class MoblyBinaryHostTest
extends Object
implements IRemoteTest , IDeviceTest , IBuildReceiver , ITestFilterReceiver , IShardableTest
java.lang.Object | |
↳ | com.android.tradefed.testtype.mobly.MoblyBinaryHostTest |
主机测试意味着从 Android 构建系统运行 mobly python 二进制文件 (Soong)
概括
公共构造函数 | |
---|---|
MoblyBinaryHostTest () |
公共方法 | |
---|---|
void | addAllExcludeFilters ( filters) addAllExcludeFilters ( filters) 添加要排除的测试的过滤器的 |
void | addAllIncludeFilters ( filters) addAllIncludeFilters ( filters) 添加要包含的测试的过滤器的 |
void | addExcludeFilter (String filter) 添加要排除的测试的过滤器。 |
void | addIncludeFilter (String filter) 添加要包含的测试的过滤器。 |
void | clearExcludeFilters () 删除当前跟踪的所有排除过滤器。 |
void | clearIncludeFilters () 删除当前跟踪的所有包含过滤器。 |
ITestDevice | getDevice () 获取被测设备。 |
getExcludeFilters () 返回排除过滤器的当前 | |
getIncludeFilters () 返回包含过滤器的当前 | |
final void | run ( TestInformation testInfo, ITestInvocationListener listener) 运行测试,并将结果报告给侦听器。 |
void | setBuild ( IBuildInfo buildInfo) |
void | setDevice ( ITestDevice device) 注入被测设备。 |
split (int shardCountHint) |
受保护的方法 | |
---|---|
String[] | buildCommandLineArray (String filePath, String configPath, tests) buildCommandLineArray (String filePath, String configPath, tests) |
String[] | buildCommandLineArray (String filePath, String configPath) |
filterTests (String[] testListLines, String runName, ITestInvocationListener listener) | |
String | getLogDirAbsolutePath () |
File | getLogDirFile () |
boolean | processYamlTestResults (InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName) 解析 Mobly 测试结果并进行结果报告。 |
void | reportLogs (File logDir, ITestInvocationListener listener) |
void | updateConfigFile (InputStream configInputStream, Writer writer) |
公共构造函数
MoblyBinaryHost测试
public MoblyBinaryHostTest ()
公共方法
添加排除过滤器
public void addExcludeFilter (String filter)
添加要排除的测试的过滤器。
参数 | |
---|---|
filter | String |
添加包含过滤器
public void addIncludeFilter (String filter)
添加要包含的测试的过滤器。
参数 | |
---|---|
filter | String |
清除排除过滤器
public void clearExcludeFilters ()
删除当前跟踪的所有排除过滤器。
清除包含过滤器
public void clearIncludeFilters ()
删除当前跟踪的所有包含过滤器。
跑步
public final void run (TestInformation testInfo, ITestInvocationListener listener)
运行测试,并将结果报告给侦听器。
参数 | |
---|---|
testInfo | TestInformation : TestInformation 对象包含运行测试的有用信息。 |
listener | ITestInvocationListener :测试结果的ITestInvocationListener |
分裂
publicsplit (int shardCountHint)
split()
的替代版本还提供尝试运行的 shardCount。这对于某些有时无法随意决定的测试运行者很有用。
参数 | |
---|---|
shardCountHint | int :尝试的分片计数。 |
退货 | |
---|---|
要单独执行的子测试集合,如果测试当前不可分片,则为null |
受保护的方法
构建命令行数组
protected String[] buildCommandLineArray (String filePath, String configPath,tests)
参数 | |
---|---|
filePath | String |
configPath | String |
tests |
退货 | |
---|---|
String[] |
构建命令行数组
protected String[] buildCommandLineArray (String filePath, String configPath)
参数 | |
---|---|
filePath | String |
configPath | String |
退货 | |
---|---|
String[] |
过滤测试
protectedfilterTests (String[] testListLines, String runName, ITestInvocationListener listener)
参数 | |
---|---|
testListLines | String |
runName | String |
listener | ITestInvocationListener |
退货 | |
---|---|
获取LogDirAbsolutePath
protected String getLogDirAbsolutePath ()
退货 | |
---|---|
String |
获取日志目录文件
protected File getLogDirFile ()
退货 | |
---|---|
File |
流程Yaml测试结果
protected boolean processYamlTestResults (InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName)
解析 Mobly 测试结果并进行结果报告。
参数 | |
---|---|
inputStream | InputStream :在 Mobly 测试结果文件中读取的 InputStream 对象。 |
parser | MoblyYamlResultParser :处理 Mobly 测试结果的 MoblyYamlResultParser 对象。 |
listener | ITestInvocationListener :执行各种报告的 ITestInitationListener 实例。 |
runName | String : str,Mobly 测试二进制运行的名称。 |
退货 | |
---|---|
boolean |
报告日志
protected void reportLogs (File logDir, ITestInvocationListener listener)
参数 | |
---|---|
logDir | File |
listener | ITestInvocationListener |
更新配置文件
protected void updateConfigFile (InputStream configInputStream, Writer writer)
参数 | |
---|---|
configInputStream | InputStream |
writer | Writer |
投掷 | |
---|---|
HarnessRuntimeException |
MoblyBinaryHost测试
public class MoblyBinaryHostTest
extends Object
implements IRemoteTest , IDeviceTest , IBuildReceiver , ITestFilterReceiver , IShardableTest
java.lang.Object | |
↳ | com.android.tradefed.testtype.mobly.MoblyBinaryHostTest |
主机测试意味着从 Android 构建系统运行 mobly python 二进制文件 (Soong)
概括
公共构造函数 | |
---|---|
MoblyBinaryHostTest () |
公共方法 | |
---|---|
void | addAllExcludeFilters ( filters) addAllExcludeFilters ( filters) 添加要排除的测试的过滤器的 |
void | addAllIncludeFilters ( filters) addAllIncludeFilters ( filters) 添加要包含的测试的过滤器的 |
void | addExcludeFilter (String filter) 添加要排除的测试的过滤器。 |
void | addIncludeFilter (String filter) 添加要包含的测试的过滤器。 |
void | clearExcludeFilters () 删除当前跟踪的所有排除过滤器。 |
void | clearIncludeFilters () 删除当前跟踪的所有包含过滤器。 |
ITestDevice | getDevice () 获取被测设备。 |
getExcludeFilters () 返回排除过滤器的当前 | |
getIncludeFilters () 返回包含过滤器的当前 | |
final void | run ( TestInformation testInfo, ITestInvocationListener listener) 运行测试,并将结果报告给侦听器。 |
void | setBuild ( IBuildInfo buildInfo) |
void | setDevice ( ITestDevice device) 注入被测设备。 |
split (int shardCountHint) |
受保护的方法 | |
---|---|
String[] | buildCommandLineArray (String filePath, String configPath, tests) buildCommandLineArray (String filePath, String configPath, tests) |
String[] | buildCommandLineArray (String filePath, String configPath) |
filterTests (String[] testListLines, String runName, ITestInvocationListener listener) | |
String | getLogDirAbsolutePath () |
File | getLogDirFile () |
boolean | processYamlTestResults (InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName) 解析 Mobly 测试结果并进行结果报告。 |
void | reportLogs (File logDir, ITestInvocationListener listener) |
void | updateConfigFile (InputStream configInputStream, Writer writer) |
公共构造函数
MoblyBinaryHost测试
public MoblyBinaryHostTest ()
公共方法
添加排除过滤器
public void addExcludeFilter (String filter)
添加要排除的测试的过滤器。
参数 | |
---|---|
filter | String |
添加包含过滤器
public void addIncludeFilter (String filter)
添加要包含的测试的过滤器。
参数 | |
---|---|
filter | String |
清除排除过滤器
public void clearExcludeFilters ()
删除当前跟踪的所有排除过滤器。
清除包含过滤器
public void clearIncludeFilters ()
删除当前跟踪的所有包含过滤器。
跑步
public final void run (TestInformation testInfo, ITestInvocationListener listener)
运行测试,并将结果报告给侦听器。
参数 | |
---|---|
testInfo | TestInformation : TestInformation 对象包含运行测试的有用信息。 |
listener | ITestInvocationListener :测试结果的ITestInvocationListener |
分裂
publicsplit (int shardCountHint)
split()
的替代版本还提供尝试运行的 shardCount。这对于某些有时无法随意决定的测试运行者很有用。
参数 | |
---|---|
shardCountHint | int :尝试的分片计数。 |
退货 | |
---|---|
要单独执行的子测试集合,如果测试当前不可分片,则为null |
受保护的方法
构建命令行数组
protected String[] buildCommandLineArray (String filePath, String configPath,tests)
参数 | |
---|---|
filePath | String |
configPath | String |
tests |
退货 | |
---|---|
String[] |
构建命令行数组
protected String[] buildCommandLineArray (String filePath, String configPath)
参数 | |
---|---|
filePath | String |
configPath | String |
退货 | |
---|---|
String[] |
过滤测试
protectedfilterTests (String[] testListLines, String runName, ITestInvocationListener listener)
参数 | |
---|---|
testListLines | String |
runName | String |
listener | ITestInvocationListener |
退货 | |
---|---|
获取LogDirAbsolutePath
protected String getLogDirAbsolutePath ()
退货 | |
---|---|
String |
获取日志目录文件
protected File getLogDirFile ()
退货 | |
---|---|
File |
流程Yaml测试结果
protected boolean processYamlTestResults (InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName)
解析 Mobly 测试结果并进行结果报告。
参数 | |
---|---|
inputStream | InputStream :在 Mobly 测试结果文件中读取的 InputStream 对象。 |
parser | MoblyYamlResultParser :处理 Mobly 测试结果的 MoblyYamlResultParser 对象。 |
listener | ITestInvocationListener :执行各种报告的 ITestInitationListener 实例。 |
runName | String : str,Mobly 测试二进制运行的名称。 |
退货 | |
---|---|
boolean |
报告日志
protected void reportLogs (File logDir, ITestInvocationListener listener)
参数 | |
---|---|
logDir | File |
listener | ITestInvocationListener |
更新配置文件
protected void updateConfigFile (InputStream configInputStream, Writer writer)
参数 | |
---|---|
configInputStream | InputStream |
writer | Writer |
投掷 | |
---|---|
HarnessRuntimeException |
MoblyBinaryHost测试
public class MoblyBinaryHostTest
extends Object
implements IRemoteTest , IDeviceTest , IBuildReceiver , ITestFilterReceiver , IShardableTest
java.lang.Object | |
↳ | com.android.tradefed.testtype.mobly.MoblyBinaryHostTest |
主机测试意味着从 Android 构建系统运行 mobly python 二进制文件 (Soong)
概括
公共构造函数 | |
---|---|
MoblyBinaryHostTest () |
公共方法 | |
---|---|
void | addAllExcludeFilters ( filters) addAllExcludeFilters ( filters) 添加要排除的测试的过滤器的 |
void | addAllIncludeFilters ( filters) addAllIncludeFilters ( filters) 添加要包含的测试的过滤器的 |
void | addExcludeFilter (String filter) 添加要排除的测试的过滤器。 |
void | addIncludeFilter (String filter) 添加要包含的测试的过滤器。 |
void | clearExcludeFilters () 删除当前跟踪的所有排除过滤器。 |
void | clearIncludeFilters () 删除当前跟踪的所有包含过滤器。 |
ITestDevice | getDevice () 获取被测设备。 |
getExcludeFilters () 返回排除过滤器的当前 | |
getIncludeFilters () 返回包含过滤器的当前 | |
final void | run ( TestInformation testInfo, ITestInvocationListener listener) 运行测试,并将结果报告给侦听器。 |
void | setBuild ( IBuildInfo buildInfo) |
void | setDevice ( ITestDevice device) 注入被测设备。 |
split (int shardCountHint) |
受保护的方法 | |
---|---|
String[] | buildCommandLineArray (String filePath, String configPath, tests) buildCommandLineArray (String filePath, String configPath, tests) |
String[] | buildCommandLineArray (String filePath, String configPath) |
filterTests (String[] testListLines, String runName, ITestInvocationListener listener) | |
String | getLogDirAbsolutePath () |
File | getLogDirFile () |
boolean | processYamlTestResults (InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName) 解析 Mobly 测试结果并进行结果报告。 |
void | reportLogs (File logDir, ITestInvocationListener listener) |
void | updateConfigFile (InputStream configInputStream, Writer writer) |
公共构造函数
MoblyBinaryHost测试
public MoblyBinaryHostTest ()
公共方法
添加排除过滤器
public void addExcludeFilter (String filter)
添加要排除的测试的过滤器。
参数 | |
---|---|
filter | String |
添加包含过滤器
public void addIncludeFilter (String filter)
添加要包含的测试的过滤器。
参数 | |
---|---|
filter | String |
清除排除过滤器
public void clearExcludeFilters ()
删除当前跟踪的所有排除过滤器。
清除包含过滤器
public void clearIncludeFilters ()
删除当前跟踪的所有包含过滤器。
跑步
public final void run (TestInformation testInfo, ITestInvocationListener listener)
运行测试,并将结果报告给侦听器。
参数 | |
---|---|
testInfo | TestInformation : TestInformation 对象包含运行测试的有用信息。 |
listener | ITestInvocationListener :测试结果的ITestInvocationListener |
分裂
publicsplit (int shardCountHint)
split()
的替代版本还提供尝试运行的 shardCount。这对于某些有时无法随意决定的测试运行者很有用。
参数 | |
---|---|
shardCountHint | int :尝试的分片计数。 |
退货 | |
---|---|
要单独执行的子测试集合,如果测试当前不可分片,则为null |
受保护的方法
构建命令行数组
protected String[] buildCommandLineArray (String filePath, String configPath,tests)
参数 | |
---|---|
filePath | String |
configPath | String |
tests |
退货 | |
---|---|
String[] |
构建命令行数组
protected String[] buildCommandLineArray (String filePath, String configPath)
参数 | |
---|---|
filePath | String |
configPath | String |
退货 | |
---|---|
String[] |
过滤测试
protectedfilterTests (String[] testListLines, String runName, ITestInvocationListener listener)
参数 | |
---|---|
testListLines | String |
runName | String |
listener | ITestInvocationListener |
退货 | |
---|---|
获取LogDirAbsolutePath
protected String getLogDirAbsolutePath ()
退货 | |
---|---|
String |
获取日志目录文件
protected File getLogDirFile ()
退货 | |
---|---|
File |
流程Yaml测试结果
protected boolean processYamlTestResults (InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName)
解析 Mobly 测试结果并进行结果报告。
参数 | |
---|---|
inputStream | InputStream :读取 Mobly 测试结果文件中的 InputStream 对象。 |
parser | MoblyYamlResultParser :处理 Mobly 测试结果的 MoblyYamlResultParser 对象。 |
listener | ITestInvocationListener :执行各种报告的 ITestInitationListener 实例。 |
runName | String : str,Mobly 测试二进制运行的名称。 |
退货 | |
---|---|
boolean |
报告日志
protected void reportLogs (File logDir, ITestInvocationListener listener)
参数 | |
---|---|
logDir | File |
listener | ITestInvocationListener |
更新配置文件
protected void updateConfigFile (InputStream configInputStream, Writer writer)
参数 | |
---|---|
configInputStream | InputStream |
writer | Writer |
投掷 | |
---|---|
HarnessRuntimeException |