จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ

TestFilePushSetup

public class TestFilePushSetup
extends BaseTargetPreparer implements IDiscoverDependencies

java.lang.Object
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.TestFilePushSetup


ITargetPreparer ที่พุชไฟล์/dirs หนึ่งไฟล์ขึ้นไปจากโฟลเดอร์ IDeviceBuildInfo.getTestsDir() บนอุปกรณ์

ผู้จัดเตรียมนี้จะดูในไดเร็กทอรีสำรองถ้า zip การทดสอบไม่มีอยู่หรือไม่มี apk ที่จำเป็น การค้นหาจะดำเนินการตามลำดับจาก dir ทางเลือกสุดท้ายที่ระบุเป็นอันดับแรก

สรุป

ผู้สร้างสาธารณะ

TestFilePushSetup ()

วิธีการสาธารณะ

reportDependencies ()
void setUp ( TestInformation testInfo)

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

void addTestFileName (String fileName)

เพิ่มไฟล์ไปยังรายการที่จะพุช

void clearTestFileName ()
getFailedToPushFiles ()

ส่งกลับชุดของไฟล์ที่ส่งไม่สำเร็จ

File getLocalPathForFilename ( IBuildInfo buildInfo, String fileName, ITestDevice device)

แก้ไขพาธฝั่งโฮสต์โดยอิงจากข้อมูลการทดสอบภายในข้อมูลบิวด์

getTestFileNames ()

ดึงรายการไฟล์ที่จะผลักจากไฟล์ zip ทดสอบไปยังอุปกรณ์

void setThrowIfNoFile (boolean throwIfNoFile)

ผู้สร้างสาธารณะ

TestFilePushSetup

public TestFilePushSetup ()

วิธีการสาธารณะ

รายงานการพึ่งพา

public  reportDependencies ()

คืนสินค้า

ติดตั้ง

public void setUp (TestInformation testInfo)

พารามิเตอร์
testInfo TestInformation

ขว้าง
BuildError
DeviceNotAvailableException
TargetSetupError

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

addTestFileName

protected void addTestFileName (String fileName)

เพิ่มไฟล์ไปยังรายการที่จะพุช

clearTestFileName

protected void clearTestFileName ()

getFailedToPushFiles

protected  getFailedToPushFiles ()

ส่งกลับชุดของไฟล์ที่ส่งไม่สำเร็จ ใช้ได้ก็ต่อเมื่อ 'throw-if-not-found' เป็นเท็จ มิฉะนั้นการกดที่ล้มเหลวครั้งแรกจะมีข้อยกเว้น

คืนสินค้า

getLocalPathForFilename

protected File getLocalPathForFilename (IBuildInfo buildInfo, 
                String fileName, 
                ITestDevice device)

แก้ไขพาธฝั่งโฮสต์โดยอิงจากข้อมูลการทดสอบภายในข้อมูลบิวด์

พารามิเตอร์
buildInfo IBuildInfo : สร้างข้อมูลสิ่งประดิษฐ์

fileName String : ชื่อไฟล์ของสิ่งประดิษฐ์ที่จะพุช

device ITestDevice

คืนสินค้า
File ERROR(/File) แทนฟิสิคัลไฟล์/พาธบนโฮสต์

ขว้าง
TargetSetupError

getTestFileNames

protected  getTestFileNames ()

ดึงรายการไฟล์ที่จะผลักจากไฟล์ zip ทดสอบไปยังอุปกรณ์

คืนสินค้า

setThrowIfNoFile

protected void setThrowIfNoFile (boolean throwIfNoFile)

พารามิเตอร์
throwIfNoFile boolean