IRemoteTest

public interface IRemoteTest

com.android.tradefed.testtype.IRemoteTest


直接向 ITestInvocationListener回報結果的測試。

相較於 JUnit,這項做法有以下優點:

  • 更容易回報在 Android 裝置上遠端執行的測試結果,因為遠端測試結果不需要從 JUnit 測試物件中不必要地封送及取消封送。
  • 支援回報測試指標

摘要

公用方法

default void run(ITestInvocationListener listener)

這個方法已淘汰, 請改用 run(TestInformation,ITestInvocationListener)

default void run(TestInformation testInfo, ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

default void setRetryAttemptNumber(int attemptNumber)

設定測試的重試次數。

公用方法

得分

public void run (ITestInvocationListener listener)

這個方法已淘汰。
請改用 run(TestInformation,ITestInvocationListener)

執行測試,並向接聽程式回報結果。

參數
listener ITestInvocationListener:測試結果的 ITestInvocationListener

擲回
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

得分

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

執行測試,並向接聽程式回報結果。

參數
testInfo TestInformation:包含執行測試實用資訊的 TestInformation 物件。

listener ITestInvocationListener:測試結果的 ITestInvocationListener

擲回
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

setRetryAttemptNumber

public void setRetryAttemptNumber (int attemptNumber)

設定測試的重試次數。預設值為無。

參數
attemptNumber int