IRemoteTest

public interface IRemoteTest

com.android.tradefed.testtype.IRemoteTest


A test that reports results directly to a ITestInvocationListener.

This has the following benefits over a JUnit.

  • easier to report the results of a test that has been run remotely on an Android device, as the results of a remote test don't need to be unnecessarily marshalled and unmarshalled from JUnit Test objects.
  • supports reporting test metrics

Summary

Public methods

default void run(ITestInvocationListener listener)

This method is deprecated. Use run(TestInformation,ITestInvocationListener) instead.

default void run(TestInformation testInfo, ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

default void setRetryAttemptNumber(int attemptNumber)

Sets the retry attempt number for the test.

Public methods

run

public void run (ITestInvocationListener listener)

This method is deprecated.
Use run(TestInformation,ITestInvocationListener) instead.

Runs the tests, and reports result to the listener.

Parameters
listener ITestInvocationListener: the ITestInvocationListener of test results

Throws
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

run

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
testInfo TestInformation: The TestInformation object containing useful information to run tests.

listener ITestInvocationListener: the ITestInvocationListener of test results

Throws
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

setRetryAttemptNumber

public void setRetryAttemptNumber (int attemptNumber)

Sets the retry attempt number for the test. Default does nothing.

Parameters
attemptNumber int