to top
public class

XmlDefsTest

extends Object
implements IDeviceTest IResumableTest IShardableTest
java.lang.Object
   ↳ com.android.tradefed.testtype.testdefs.XmlDefsTest

Class Overview

Runs a set of instrumentation test's defined in test_defs.xml files.

The test definition files can either be one or more files on local file system, and/or one or more files stored on the device under test.

Summary

Constants
String COVERAGE_TARGET_KEY the metric key name for the test coverage target value
Public Constructors
XmlDefsTest()
Public Methods
ITestDevice getDevice()
Get the device under test.
boolean isResumable()
void run(ITestInvocationListener listener)
Runs the tests, and reports result to the listener.
void setDevice(ITestDevice device)
Inject the device under test.
Collection<IRemoteTest> split()
Shard the test into separately runnable chunks.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.tradefed.testtype.IDeviceTest
From interface com.android.tradefed.testtype.IResumableTest
From interface com.android.tradefed.testtype.IShardableTest
From interface com.android.tradefed.testtype.IRemoteTest

Constants

public static final String COVERAGE_TARGET_KEY

the metric key name for the test coverage target value

Constant Value: "coverage_target"

Public Constructors

public XmlDefsTest ()

Public Methods

public ITestDevice getDevice ()

Get the device under test.

Returns

public boolean isResumable ()

public void run (ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
listener the ITestInvocationListener of test results

public void setDevice (ITestDevice device)

Inject the device under test.

Parameters
device the ITestDevice to use

public Collection<IRemoteTest> split ()

Shard the test into separately runnable chunks.

This will be called before test execution, so injected dependencies (such as the ITestDevice for IDeviceTests) may be null.

Returns
  • a collection of subtests to be executed separately or null if test is not currently shardable