ITargetPreparer
public
interface
ITargetPreparer
implements
IDisableable
com.android.tradefed.targetprep.ITargetPreparer |
เตรียมสภาพแวดล้อมการทดสอบสําหรับการทดสอบ
เช่น ติดตั้งซอฟต์แวร์ ปรับการตั้งค่าสภาพแวดล้อมสําหรับการทดสอบ เปิดใช้งานเป้าหมาย ฯลฯ
โปรดทราบว่าคุณระบุ ITargetPreparer
หลายรายการได้ในการกำหนดค่า ขอแนะนำให้ ITargetPreparer แต่ละรายการบันทึกสภาพแวดล้อมก่อนและหลังการตั้งค่าที่คาดไว้อย่างชัดเจน เช่น ITargetPreparer ที่กําหนดค่าอุปกรณ์สําหรับการทดสอบต้องเรียกใช้หลังจาก ITargetPreparer ที่ติดตั้งซอฟต์แวร์
สรุป
เมธอดสาธารณะ | |
---|---|
default
void
|
setUp(ITestDevice device, IBuildInfo buildInfo)
เราเลิกใช้งานเมธอดนี้แล้ว
ใช้ |
default
void
|
setUp(TestInformation testInformation)
ตั้งค่าเป้าหมายสําหรับการทดสอบ |
default
void
|
tearDown(TestInformation testInformation, Throwable e)
ทําการล้าง/รื้อถอนเป้าหมายหลังจากการทดสอบ |
default
void
|
tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)
เราเลิกใช้งานเมธอดนี้แล้ว
ใช้ |
เมธอดสาธารณะ
setUp
public void setUp (ITestDevice device, IBuildInfo buildInfo)
วิธีการนี้เลิกใช้งานแล้ว
ใช้ setUp(com.android.tradefed.invoker.TestInformation)
แทน
ตั้งค่าเป้าหมายสําหรับการทดสอบ
พารามิเตอร์ | |
---|---|
device |
ITestDevice : ITestDevice ที่จะเตรียม |
buildInfo |
IBuildInfo : ข้อมูลเกี่ยวกับบิลด์ที่ทดสอบ |
การโยน | |
---|---|
TargetSetupError |
if fatal error occurred setting up environment |
BuildError |
หากเกิดข้อผิดพลาดเกี่ยวกับ BuildInfo |
DeviceNotAvailableException |
หากอุปกรณ์ไม่ตอบสนอง |
setUp
public void setUp (TestInformation testInformation)
ตั้งค่าเป้าหมายสําหรับการทดสอบ
พารามิเตอร์ | |
---|---|
testInformation |
TestInformation : TestInformation ของการเรียกใช้ |
การโยน | |
---|---|
TargetSetupError |
if fatal error occurred setting up environment |
BuildError |
หากเกิดข้อผิดพลาดเนื่องจากกำลังเตรียมบิลด์ |
DeviceNotAvailableException |
หากอุปกรณ์ไม่ตอบสนอง |
tearDown
public void tearDown (TestInformation testInformation, Throwable e)
ทําการล้าง/รื้อถอนเป้าหมายหลังจากการทดสอบ
พารามิเตอร์ | |
---|---|
testInformation |
TestInformation : TestInformation ของการเรียกใช้ |
e |
Throwable : หากการเรียกใช้สิ้นสุดด้วยข้อยกเว้น ข้อยกเว้นนี้จะเป็นข้อยกเว้นที่พบในระดับการเรียกใช้ มิเช่นนั้นจะเป็น null |
การโยน | |
---|---|
DeviceNotAvailableException |
หากอุปกรณ์ไม่ตอบสนอง |
tearDown
public void tearDown (ITestDevice device, IBuildInfo buildInfo, Throwable e)
วิธีการนี้เลิกใช้งานแล้ว
ใช้ tearDown(com.android.tradefed.invoker.TestInformation, Throwable)
แทน
ทําการล้าง/รื้อถอนเป้าหมายหลังจากการทดสอบ
พารามิเตอร์ | |
---|---|
device |
ITestDevice : ITestDevice ที่จะเตรียม |
buildInfo |
IBuildInfo : ข้อมูลเกี่ยวกับบิลด์ที่ทดสอบ |
e |
Throwable : หากการเรียกใช้สิ้นสุดด้วยข้อยกเว้น ข้อยกเว้นนี้จะเป็นข้อยกเว้นที่พบในระดับการเรียกใช้ มิเช่นนั้นจะเป็น null |
การโยน | |
---|---|
DeviceNotAvailableException |
หากอุปกรณ์ไม่ตอบสนอง |