FeatureFlagTargetPreparer
public
class
FeatureFlagTargetPreparer
extends BaseTargetPreparer
更新 DeviceConfig(由远程服务调整的功能标志)。
这可用于重现设备的状态(使用 `adb shell device_config list` 将所有标志值转储到文件中),或批量启用/停用标志(全部启用/全部停用测试)。
用法示例:
- 如需用于全开/全关测试,请指定必要的标志文件:
--flag-file=flag_file_path
- 如需替换一个或多个标志,请指定其值(可以与标志文件结合使用):
--flag-file=flag_file_path --flag-value=namespace/name=value
- 如需用于可逆性测试,请指定全开文件,然后指定全关文件,并在两个文件之间启用重新启动:
--flag-file=all_on_file_path --flag-file=all_off_file_path --reboot-between-flag-files
应与 DeviceSetup
结合使用,以在测试期间停用 DeviceConfig 同步,因为同步可能会覆盖此准备程序所做的更改。
摘要
公共构造函数
FeatureFlagTargetPreparer
public FeatureFlagTargetPreparer ()
公共方法
public void setUp (TestInformation testInformation)
参数 |
testInformation |
TestInformation |
public void tearDown (TestInformation testInformation,
Throwable e)
参数 |
testInformation |
TestInformation |
e |
Throwable |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-26。
[null,null,["最后更新时间 (UTC):2025-03-26。"],[],[]]