InstalledInstrumentationsTest
public
class
InstalledInstrumentationsTest
extends Object
implements
IAutoRetriableTest,
IConfigurationReceiver,
IDeviceTest,
IMetricCollectorReceiver,
IShardableTest
java.lang.Object | |
↳ | com.android.tradefed.testtype.InstalledInstrumentationsTest |
Runs all instrumentation found on current device.
Summary
Public constructors | |
---|---|
InstalledInstrumentationsTest()
|
Public methods | |
---|---|
ITestDevice
|
getDevice()
Get the device under test. |
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
Runs the tests, and reports result to the listener. |
void
|
setConfiguration(IConfiguration configuration)
Injects the |
void
|
setDevice(ITestDevice device)
Inject the device under test. |
void
|
setMetricCollectors(
Sets the list of |
boolean
|
shouldRetry(int attemptJustExecuted,
|
|
split(int shardCountHint)
Alternative version of |
Public constructors
InstalledInstrumentationsTest
public InstalledInstrumentationsTest ()
Public methods
getDevice
public ITestDevice getDevice ()
Get the device under test.
Returns | |
---|---|
ITestDevice |
the ITestDevice |
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 | |
---|---|
DeviceNotAvailableException |
setConfiguration
public void setConfiguration (IConfiguration configuration)
Injects the IConfiguration
in use.
Parameters | |
---|---|
configuration |
IConfiguration |
setDevice
public void setDevice (ITestDevice device)
Inject the device under test.
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to use |
setMetricCollectors
public void setMetricCollectors (collectors)
Sets the list of IMetricCollector
s defined for the test run.
Parameters | |
---|---|
collectors |
|
shouldRetry
public boolean shouldRetry (int attemptJustExecuted,previousResults, skipList)
Delegated from ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List))
. Decide whether or
not retry should be attempted. Also make any necessary changes to the IRemoteTest
to
be retried (Applying filters, preparing next run, etc.).
Parameters | |
---|---|
attemptJustExecuted |
int : The number of the attempt that we just ran. |
previousResults |
: The list of TestRunResult of the test that just ran. |
skipList |
: The set of items that shouldn't be retried. |
Returns | |
---|---|
boolean |
True if we should retry, False otherwise. |
Throws | |
---|---|
DeviceNotAvailableException |
split
publicsplit (int shardCountHint)
Alternative version of split()
which also provides the shardCount that is attempted
to be run. This is useful for some test runner that cannot arbitrarily decide sometimes.
Parameters | |
---|---|
shardCountHint |
int : the attempted shard count. |
Returns | |
---|---|
|
a collection of subtests to be executed separately or null if test is
not currently shardable |