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(List<IMetricCollector> collectors)
Sets the list of |
boolean
|
shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)
Delegated from |
Collection<IRemoteTest>
|
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 (List<IMetricCollector> collectors)
Sets the list of IMetricCollectors defined for the test run.
| Parameters | |
|---|---|
collectors |
List |
shouldRetry
public boolean shouldRetry (int attemptJustExecuted,
List<TestRunResult> previousResults,
Set<String> skipList)Delegated from 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 |
List: The list of TestRunResult of the test that just ran. |
skipList |
Set: The set of items that shouldn't be retried. |
| Returns | |
|---|---|
boolean |
True if we should retry, False otherwise. |
| Throws | |
|---|---|
DeviceNotAvailableException |
|
split
public Collection<IRemoteTest> split (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 | |
|---|---|
Collection<IRemoteTest> |
a collection of subtests to be executed separately or null if test is
not currently shardable |