Trade Federation 中的全域過濾器

全域過濾器是一種向 Tradefed 提供測試過濾器的方法,該過濾器將自動應用於調用,而無需擔心測試是否支援它。

如果配置不支援過濾,它將處於 inop 狀態,但提供了不拋出配置異常的好處,就像 Tradefed 中通常的情況一樣。這使得對 Tradefed 了解最少的服務能夠輕鬆產生並提供通用的過濾器標誌。

句法

--global-filters:include-filter [abi] module-name [test-class][#method-name]

--global-filters:exclude-filter [abi] module-name [test-class][#method-name]

其中模組名稱是唯一需要提供的強制部分。

例如:

  • --global-filters:include-filter moduleA :僅執行此模組
  • --global-filters:include-filter moduleA class#method : 只會運行匹配的方法

如果需要更多過濾器,可以重複該選項。排除優先於包含。

執行

原始碼