FeatureFlagTargetPreparer

public class FeatureFlagTargetPreparer
extends BaseTargetPreparer

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


อัปเดต DeviceConfig (แฟล็กฟีเจอร์ที่ปรับแต่งโดยบริการระยะไกล)

ซึ่งสามารถใช้เพื่อจำลองสถานะของอุปกรณ์ (โดยการทิ้งค่าแฟล็กทั้งหมดไปยังไฟล์โดยใช้ `รายการอุปกรณ์เชลล์ adb_config`) หรือเพื่อเปิด/ปิดใช้งานแฟล็กจำนวนมาก (การทดสอบแบบเปิด/ปิดทั้งหมด)

ตัวอย่างการใช้งาน:

  • หากต้องการใช้สำหรับการทดสอบแบบเปิด/ปิดทั้งหมด ให้ระบุไฟล์แฟล็กที่จำเป็น:
    --flag-file=flag_file_path
  • หากต้องการแทนที่แฟล็กตั้งแต่หนึ่งแฟล็ก ให้ระบุค่า (สามารถรวมกับไฟล์แฟล็กได้):
    --flag-file=flag_file_path --flag-value=namespace/name=value
  • หากต้องการใช้สำหรับการทดสอบการย้อนกลับ ให้ระบุไฟล์ all-on ตามด้วยไฟล์ all-off และเปิดใช้งานการรีบูตระหว่างสองไฟล์:
    --flag-file=all_on_file_path --flag-file=all_off_file_path --reboot-between-flag-files
           

ควรใช้ร่วมกับ DeviceSetup เพื่อปิดใช้งานการซิงค์ DeviceConfig ในระหว่างการทดสอบ ซึ่งอาจเขียนทับการเปลี่ยนแปลงที่ทำโดยผู้จัดเตรียมนี้

สรุป

ผู้รับเหมาก่อสร้างสาธารณะ

FeatureFlagTargetPreparer ()

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

void setUp ( TestInformation testInformation)
void tearDown ( TestInformation testInformation, Throwable e)

ผู้รับเหมาก่อสร้างสาธารณะ

FeatureFlagTargetPreparer

public FeatureFlagTargetPreparer ()

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

ติดตั้ง

public void setUp (TestInformation testInformation)

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

ขว้าง
BuildError
DeviceNotAvailableException
TargetSetupError

การถอดออก

public void tearDown (TestInformation testInformation, 
                Throwable e)

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

e Throwable

ขว้าง
DeviceNotAvailableException