MoblyBinaryHostTest
public class MoblyBinaryHostTest
extends Object
implements IRemoteTest , IDeviceTest , IBuildReceiver , ITestFilterReceiver
java.lang.Object | |
↳ | com.android.tradefed.testtype.mobly.MoblyBinaryHostTest |
การทดสอบโฮสต์หมายถึงการเรียกใช้ไฟล์ไบนารี python mobly จากระบบ Android Build (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) ฉีดอุปกรณ์ภายใต้การทดสอบ |
วิธีการป้องกัน | |
---|---|
String[] | buildCommandLineArray (String filePath, String configPath, tests) buildCommandLineArray (String filePath, String configPath, tests) |
String[] | buildCommandLineArray (String filePath, String configPath) |
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) |
ผู้สร้างสาธารณะ
MoblyBinaryHostTest
public MoblyBinaryHostTest ()
วิธีการสาธารณะ
เพิ่มตัวกรองที่ไม่รวมทั้งหมด
public void addAllExcludeFilters (filters)
เพิ่ม ERROR(/Set)
ของตัวกรองที่จะไม่รวมการทดสอบ
พารามิเตอร์ | |
---|---|
filters |
เพิ่มตัวกรองรวมทั้งหมด
public void addAllIncludeFilters (filters)
เพิ่ม ERROR(/Set)
ของตัวกรองที่จะรวมการทดสอบ
พารามิเตอร์ | |
---|---|
filters |
เพิ่ม ExcludeFilter
public void addExcludeFilter (String filter)
เพิ่มตัวกรองที่จะไม่รวมการทดสอบ
พารามิเตอร์ | |
---|---|
filter | String |
เพิ่มรวมตัวกรอง
public void addIncludeFilter (String filter)
เพิ่มตัวกรองที่จะรวมการทดสอบ
พารามิเตอร์ | |
---|---|
filter | String |
clearExcludeFilter
public void clearExcludeFilters ()
ลบตัวกรองแยกทั้งหมดที่ติดตามอยู่ในปัจจุบัน
ล้างรวมตัวกรอง
public void clearIncludeFilters ()
ลบตัวกรองรวมทั้งหมดที่ติดตามอยู่ในปัจจุบัน
วิ่ง
public final void run (TestInformation testInfo, ITestInvocationListener listener)
ดำเนินการทดสอบและรายงานผลให้ผู้ฟังทราบ
พารามิเตอร์ | |
---|---|
testInfo | TestInformation : อ็อบเจกต์ TestInformation ที่มีข้อมูลที่เป็นประโยชน์เพื่อเรียกใช้การทดสอบ |
listener | ITestInvocationListener : ITestInvocationListener ของผลการทดสอบ |
ชุดอุปกรณ์
public void setDevice (ITestDevice device)
ฉีดอุปกรณ์ภายใต้การทดสอบ
พารามิเตอร์ | |
---|---|
device | ITestDevice : ITestDevice ที่จะใช้ |
วิธีการป้องกัน
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[] |
getLogDirAbsolutePath
protected String getLogDirAbsolutePath ()
ส่งคืน | |
---|---|
String |
getLogDirFile
protected File getLogDirFile ()
ส่งคืน | |
---|---|
File |
กระบวนการ YamlTestResults
protected boolean processYamlTestResults (InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName)
แยกวิเคราะห์ผลการทดสอบ Mobly และรายงานผล
พารามิเตอร์ | |
---|---|
inputStream | InputStream : การอ่านวัตถุ InputStream ในไฟล์ผลการทดสอบ Mobly |
parser | MoblyYamlResultParser : วัตถุ MoblyYamlResultParser ที่ประมวลผลผลการทดสอบ Mobly |
listener | ITestInvocationListener : อินสแตนซ์ ITestInvocationListener ที่ทำรายงานต่างๆ |
runName | String : str ชื่อของการเรียกใช้ไบนารีการทดสอบ Mobly |
ส่งคืน | |
---|---|
boolean |
บันทึกรายงาน
protected void reportLogs (File logDir, ITestInvocationListener listener)
พารามิเตอร์ | |
---|---|
logDir | File |
listener | ITestInvocationListener |
อัปเดต ConfigFile
protected void updateConfigFile (InputStream configInputStream, Writer writer)
พารามิเตอร์ | |
---|---|
configInputStream | InputStream |
writer | Writer |
พ่น | |
---|---|
HarnessRuntimeException |