透過集合功能整理內容
你可以依據偏好儲存及分類內容。
FeatureFlagTargetPreparer
public
class
FeatureFlagTargetPreparer
extends BaseTargetPreparer
更新 DeviceConfig (由遠端服務調整的功能旗標)。
這可用來重現裝置狀態 (透過將所有旗標值傾印至某個檔案)
使用「adb shell device_config list」指令,或是大量啟用/停用標記 (all-on/all-off 測試)。
使用方式範例:
- 如要用於執行所有測試/全部關閉測試,請指定必要的標記檔案:
--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 和/或其關係企業的商標或註冊商標。
上次更新時間:2024-08-29 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-08-29 (世界標準時間)。"],[],[]]