ArtTest

public class ArtTest
extends Object implements IAbiReceiver, IShardableTest, ITestFilterReceiver

java.lang.Object
   ↳ com.android.tradefed.testtype.ArtTest


Summary

Fields

protected ITestDevice mDevice

protected File mRunnerDir

protected int mShardCount

protected int mShardIndex

protected TestInformation mTestInfo

protected List<ArtTest.Test> mTests

Public constructors

ArtTest()

Public methods

void addAllExcludeFilters(Set<String> filters)

Adds the Set of filters of which tests to exclude.

void addAllIncludeFilters(Set<String> filters)

Adds the Set of filters of which tests to include.

void addExcludeFilter(String filter)

Adds a filter of which tests to exclude.

void addIncludeFilter(String filter)

Adds a filter of which tests to include.

void clearExcludeFilters()

Delete all the exclude filters currently tracked.

void clearIncludeFilters()

Delete all the include filters currently tracked.

IAbi getAbi()
Set<String> getExcludeFilters()

Returns the current Set of exclude filters.

Set<String> getIncludeFilters()

Returns the current Set of include filters.

void run(TestInformation testInfo, ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

void setAbi(IAbi abi)
Collection<IRemoteTest> split(int shardCount)

Alternative version of split() which also provides the shardCount that is attempted to be run.

Fields

mDevice

protected ITestDevice mDevice

mRunnerDir

protected File mRunnerDir

mShardCount

protected int mShardCount

mShardIndex

protected int mShardIndex

mTestInfo

protected TestInformation mTestInfo

mTests

protected List<ArtTest.Test> mTests

Public constructors

ArtTest

public ArtTest ()

Public methods

addAllExcludeFilters

public void addAllExcludeFilters (Set<String> filters)

Adds the Set of filters of which tests to exclude.

Parameters
filters Set

addAllIncludeFilters

public void addAllIncludeFilters (Set<String> filters)

Adds the Set of filters of which tests to include.

Parameters
filters Set

addExcludeFilter

public void addExcludeFilter (String filter)

Adds a filter of which tests to exclude.

Parameters
filter String

addIncludeFilter

public void addIncludeFilter (String filter)

Adds a filter of which tests to include.

Parameters
filter String

clearExcludeFilters

public void clearExcludeFilters ()

Delete all the exclude filters currently tracked.

clearIncludeFilters

public void clearIncludeFilters ()

Delete all the include filters currently tracked.

getAbi

public IAbi getAbi ()

Returns
IAbi

getExcludeFilters

public Set<String> getExcludeFilters ()

Returns the current Set of exclude filters.

Returns
Set<String>

getIncludeFilters

public Set<String> getIncludeFilters ()

Returns the current Set of include filters.

Returns
Set<String>

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

setAbi

public void setAbi (IAbi abi)

Parameters
abi IAbi

split

public Collection<IRemoteTest> split (int shardCount)

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
shardCount int: the attempted shard count.

Returns
Collection<IRemoteTest> a collection of subtests to be executed separately or null if test is not currently shardable