MoblyBinaryHostTest

public class MoblyBinaryHostTest
extends Object implements IBuildReceiver, IDeviceTest, IRemoteTest, IShardableTest, ITestFilterReceiver

java.lang.Object
   ↳ com.android.tradefed.testtype.mobly.MoblyBinaryHostTest


การทดสอบโฮสต์มีไว้เพื่อเรียกใช้ไฟล์ไบนารี Python ของ Mobly จากระบบบิลด์ Android (Soong)

สรุป

ตัวสร้างแบบสาธารณะ

MoblyBinaryHostTest()

เมธอดสาธารณะ

void addAllExcludeFilters( filters)

เพิ่ม ERROR(/Set) ของตัวกรองการทดสอบที่จะยกเว้น

void addAllIncludeFilters( filters)

เพิ่ม ERROR(/Set) ของตัวกรองการทดสอบที่จะรวม

void addExcludeFilter(String filter)

เพิ่มตัวกรองการทดสอบที่จะยกเว้น

void addIncludeFilter(String filter)

เพิ่มตัวกรองการทดสอบที่จะรวม

void clearExcludeFilters()

ลบตัวกรองการยกเว้นทั้งหมดที่ติดตามอยู่ในขณะนี้

void clearIncludeFilters()

ลบตัวกรองรวมทั้งหมดที่ติดตามอยู่ในปัจจุบัน

ITestDevice getDevice()

นำอุปกรณ์ที่จะทดสอบ

getExcludeFilters()

แสดงผล ERROR(/Set) ของตัวกรองการยกเว้นปัจจุบัน

getIncludeFilters()

แสดงผล ERROR(/Set) ปัจจุบันของตัวกรองรวม

final void run(TestInformation testInfo, ITestInvocationListener listener)

เรียกใช้การทดสอบและรายงานผลลัพธ์ไปยังผู้ฟัง

void setBuild(IBuildInfo buildInfo)
void setDevice(ITestDevice device)

ใส่อุปกรณ์ทดสอบ

split(int shardCountHint)

split() เวอร์ชันอื่น ซึ่งระบุ shardCount ที่พยายามเรียกใช้ด้วย

วิธีการที่มีการป้องกัน

String[] 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)

ตัวสร้างแบบสาธารณะ

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 ()

ลบตัวกรองรวมทั้งหมดที่ติดตามอยู่ในปัจจุบัน

getDevice

public ITestDevice getDevice ()

นำอุปกรณ์ที่จะทดสอบ

คิกรีเทิร์น
ITestDevice ITestDevice

getExcludeFilters

public  getExcludeFilters ()

แสดงผล ERROR(/Set) ของตัวกรองการยกเว้นปัจจุบัน

คิกรีเทิร์น

getIncludeFilters

public  getIncludeFilters ()

แสดงผล ERROR(/Set) ปัจจุบันของตัวกรองรวม

คิกรีเทิร์น

โฮมรัน

public final void run (TestInformation testInfo, 
                ITestInvocationListener listener)

เรียกใช้การทดสอบและรายงานผลลัพธ์ไปยังผู้ฟัง

พารามิเตอร์
testInfo TestInformation: ออบเจ็กต์ TestInformation ที่มีข้อมูลที่เป็นประโยชน์ต่อการทดสอบ

listener ITestInvocationListener: ITestInvocationListener ของผลการทดสอบ

setBuild

public void setBuild (IBuildInfo buildInfo)

พารามิเตอร์
buildInfo IBuildInfo

setDevice

public void setDevice (ITestDevice device)

ใส่อุปกรณ์ทดสอบ

พารามิเตอร์
device ITestDevice: ITestDevice ที่จะใช้

แยก

public  split (int shardCountHint)

split() เวอร์ชันอื่น ซึ่งระบุ shardCount ที่พยายามเรียกใช้ด้วย ซึ่งมีประโยชน์สำหรับโปรแกรมทดสอบบางรายการที่ตัดสินใจแบบตามอำเภอใจไม่ได้ในบางครั้ง

พารามิเตอร์
shardCountHint int: จํานวนชาร์ดที่พยายาม

คิกรีเทิร์น
ชุดการทดสอบย่อยที่จะเรียกใช้แยกกัน หรือ 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

protected  filterTests (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: ออบเจ็กต์ InputStream ที่อ่านในไฟล์ผลลัพธ์การทดสอบของ Mobly

parser MoblyYamlResultParser: ออบเจ็กต์ MoblyYamlResultParser ที่ประมวลผลผลการทดสอบของ Mobly

listener ITestInvocationListener: อินสแตนซ์ ITestInvocationListener ที่ใช้รายงานต่างๆ

runName String: str, ชื่อของการดำเนินการไบนารีการทดสอบ Mobly

คิกรีเทิร์น
boolean

reportLogs

protected void reportLogs (File logDir, 
                ITestInvocationListener listener)

พารามิเตอร์
logDir File

listener ITestInvocationListener

updateConfigFile

protected void updateConfigFile (InputStream configInputStream, 
                Writer writer)

พารามิเตอร์
configInputStream InputStream

writer Writer

การโยน
HarnessRuntimeException