IRemoteTest

public interface IRemoteTest

com.android.tradefed.testtype.IRemoteTest


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

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

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

摘要

公用方法

default void run(ITestInvocationListener listener)

這個方法已淘汰。 請改用 run(com.android.tradefed.invoker.TestInformation, com.android.tradefed.result.ITestInvocationListener)

default void run(TestInformation testInfo, ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

公用方法

得分

public void run (ITestInvocationListener listener)

這個方法已淘汰。
請改用 run(com.android.tradefed.invoker.TestInformation, com.android.tradefed.result.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