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

คุณสมบัติFlagTargetPreparer

public class FeatureFlagTargetPreparer
extends BaseTargetPreparer

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


อัปเดต DeviceConfig (ตั้งค่าสถานะคุณลักษณะโดยบริการระยะไกล)

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

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

  • หากต้องการใช้สำหรับการทดสอบแบบเปิด/ปิดทั้งหมด ให้ระบุไฟล์แฟล็กที่จำเป็น:
    --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)

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

คุณสมบัติFlagTargetPreparer

public FeatureFlagTargetPreparer ()

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

ติดตั้ง

public void setUp (TestInformation testInformation)

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

ขว้าง
BuildError
DeviceNotAvailableException
TargetSetupError

การถอดออก

public void tearDown (TestInformation testInformation, 
                Throwable e)

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

e Throwable

ขว้าง
DeviceNotAvailableException