Added in API level Baklava
Deprecated in API level Baklava

UnitTestSuiteBuilder


open class UnitTestSuiteBuilder : TestSuiteBuilder

A suite builder that finds unit tests.

Summary

Public constructors

UnitTestSuiteBuilder(name: String!, classLoader: ClassLoader!)

Inherited functions
TestSuite! build()

Call this method once you've configured your builder as desired.

TestSuiteBuilder! excludePackages(vararg packageNames: String!)

Exclude all tests in the given packages and all sub-packages, unless otherwise specified.

String! getSuiteName()

Subclasses use this method to determine the name of the suite.

TestSuiteBuilder! includeAllPackagesUnderHere()

Include all junit tests that satisfy the requirements in the calling class' package and all sub-packages.

TestSuiteBuilder! includePackages(vararg packageNames: String!)

Include all tests that satisfy the requirements in the given packages and all sub-packages, unless otherwise specified.

TestSuiteBuilder! named(newSuiteName: String!)

Override the default name for the suite being built. This should generally be called if you call addRequirements(com.android.internal.util.Predicate[]) to make it clear which tests will be included. The name you specify is automatically prefixed with the package containing the tests to be run. If more than one package is specified, the first is used.

Public constructors

UnitTestSuiteBuilder

UnitTestSuiteBuilder(clazz: Class<Any!>!)

UnitTestSuiteBuilder

UnitTestSuiteBuilder(
    name: String!,
    classLoader: ClassLoader!)