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)

執行測試,並將結果回報給監聽器。

公用方法

得分

public void run (ITestInvocationListener listener)

This method is deprecated.
請改用 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