遠端測試逾時執行器
public class RemoteTestTimeOutEnforcer
extends Object
implements ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.testtype.suite.RemoteTestTimeOutEnforcer |
允許檢查給定測試配置的執行時間的偵聽器,如果超過給定的逾時則使測試失敗。
請注意,此強制執行器不會中斷測試,但會使測試失敗。
概括
領域 | |
---|---|
public static final String | REMOTE_TEST_TIMEOUT_DESCRIPTION |
public static final String | REMOTE_TEST_TIMEOUT_OPTION
|
公共構造函數 | |
---|---|
RemoteTestTimeOutEnforcer ( ModuleListener listener, ModuleDefinition moduleDefinition, IRemoteTest test, Duration timeOut) 建立具有要強制執行的給定逾時的 |
公共方法 | |
---|---|
void | testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics) 報告測試運行結束。 |
領域
REMOTE_TEST_TIMEOUT_DESCRIPTION
public static final String REMOTE_TEST_TIMEOUT_DESCRIPTION
REMOTE_TEST_TIMEOUT_OPTION
public static final String REMOTE_TEST_TIMEOUT_OPTION
公共構造函數
遠端測試逾時執行器
public RemoteTestTimeOutEnforcer (ModuleListener listener, ModuleDefinition moduleDefinition, IRemoteTest test, Duration timeOut)
建立具有要強制執行的給定逾時的RemoteTestTimeOutEnforcer
。
參數 | |
---|---|
listener | ModuleListener :每次測試運行的ModuleListener 。 |
moduleDefinition | ModuleDefinition :要執行的測試模組的ModuleDefinition 。 |
test | IRemoteTest :要執行的IRemoteTest 。 |
timeOut | Duration :每次測試運行超時的ERROR(/Duration) 。 |
公共方法
測試運行結束
public void testRunEnded (long elapsedTime,runMetrics)
報告測試運行結束。 FIXME:我們不能有兩個不同類型的 Map<> 接口,所以我們必須在這裡使用 HashMap。
參數 | |
---|---|
elapsedTime | long :設備報告的經過時間,以毫秒為單位 |
runMetrics | Metric 測試運行結束時報告的鍵值對。 |