IRemoteTest

public interface IRemoteTest

com.android.tradefed.testtype.IRemoteTest
Known Indirect Subclasses
AndroidJUnitTest A Test that runs an instrumentation test package on given device using the android.support.test.runner.AndroidJUnitRunner. 
CodeCoverageTest A Test that runs an instrumentation test package on a given device and generates the code coverage report. 
CodeCoverageTestBase<T extends CodeCoverageReportFormat> An abstract base class which runs installed instrumentation test(s) and collects execution data from each test that was run. 
CompanionAwareTest Base test class that encapsulates boilerpate of getting and checking companion device

Subclass may call getCompanion() to retrieve the allocated companion. 

DeviceBatteryLevelChecker An ITargetPreparer that checks for a minimum battery charge, and waits for the battery to reach a second charging threshold if the minimum charge isn't present. 
DeviceTestCase Helper JUnit test case that provides the IRemoteTest and IDeviceTest services. 
DeviceTestSuite Helper JUnit test suite that provides the IRemoteTest and IDeviceTest services. 
FakeTest A fake test whose purpose is to make it easy to generate repeatable test results. 
GTest A Test that runs a native test package on given device. 
GoogleBenchmarkTest A Test that runs a Google benchmark test package on given device. 
HostTest A test runner for JUnit host based tests. 
IResumableTest An IRemoteTest that supports resuming a previous aborted test run from where it left off. 
IRetriableTest A IRemoteTest that supports retrying if the test aborted before completion. 
IShardableTest A IRemoteTest that can be split into separately executable sub-tests. 
IStrictShardableTest A IRemoteTest that can be sharded into separately executable sub-tests. 
ITestSuite Abstract class used to run Test Suite. 
InstalledInstrumentationsTest Runs all instrumentation found on current device. 
InstrumentationFileTest Runs a set of instrumentation tests by specifying a list of line separated test classes and methods in a file pushed to device (expected format: com.android.foo.FooClassName#testMethodName)

Note: Requires a runner that supports test execution from a file. 

InstrumentationSerialTest A Test that runs a set of instrumentation tests by running one adb command for per test. 
InstrumentationTest A Test that runs an instrumentation test package on given device. 
JackCodeCoverageTest An IRemoteTest which runs installed instrumentation test(s) and generates a code coverage report. 
JacocoCodeCoverageTest An IRemoteTest that generates a code coverage report by generating build.xml on the fly and executing the ant command. 
LogFilesReporter Helper test component that pulls files located on a device and adds them to the test logs. 
NativeBenchmarkTest A Test that runs a native benchmark test executable on given device. 
NativeStressTest A Test that runs a native stress test executable on given device. 
NoisyDryRunTest Run noisy dry run on a command file. 
PythonUnitTestRunner Runs Python tests written with the unittest library. 
StubTest No-op empty test implementation. 
SubprocessTfLauncher A IRemoteTest for running tests against a separate TF installation. 
TestSuiteStub A test Stub that can be used to fake some runs for suite's testing. 
TestsPoolPoller Tests wrapper that allow to execute all the tests of a pool of tests. 
TfSuiteRunner Implementation of ITestSuite which will load tests from TF jars res/config/suite/ folder. 
TfTestLauncher A IRemoteTest for running unit or functional tests against a separate TF installation. 
UiAutomatorTest  
VersionedTfLauncher A IRemoteTest for running tests against a separate TF installation. 
XmlDefsTest Runs a set of instrumentation test's defined in test_defs.xml files. 


A test that reports results directly to a ITestInvocationListener.

This has the following benefits over a JUnit Test

  • 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 Test objects.
  • supports reporting test metrics

Summary

Public methods

abstract void run(ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Public methods

run

void run (ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
listener ITestInvocationListener: the ITestInvocationListener of test results

Throws
DeviceNotAvailableException