TestSuiteBuilder
open classTestSuiteBuilder
kotlin.Any | |
↳ | android.test.suitebuilder.TestSuiteBuilder |
Build suites based on a combination of included packages, excluded packages, and predicates that must be satisfied.
Summary
Nested classes | |
---|---|
open |
A special junit. |
Public constructors | |
---|---|
TestSuiteBuilder(clazz: Class<Any!>!) The given name is automatically prefixed with the package containing the tests to be run. |
|
TestSuiteBuilder(name: String!, classLoader: ClassLoader!) |
Public methods | |
---|---|
TestSuite! |
build() Call this method once you've configured your builder as desired. |
open TestSuiteBuilder! |
excludePackages(vararg packageNames: String!) Exclude all tests in the given packages and all sub-packages, unless otherwise specified. |
TestSuiteBuilder! |
Include all junit tests that satisfy the requirements in the calling class' package and all sub-packages. |
open TestSuiteBuilder! |
includePackages(vararg packageNames: String!) Include all tests that satisfy the requirements in the given packages and all sub-packages, unless otherwise specified. |
open TestSuiteBuilder! |
Override the default name for the suite being built. |
Protected methods | |
---|---|
open String! |
Subclasses use this method to determine the name of the suite. |
Public constructors
TestSuiteBuilder
TestSuiteBuilder(clazz: Class<Any!>!)
The given name is automatically prefixed with the package containing the tests to be run. If more than one package is specified, the first is used.
Parameters | |
---|---|
clazz |
Class<Any!>!: Use the class from your .apk. Use the class name for the test suite name. Use the class' classloader in order to load classes for testing. This is needed when running in the emulator. |
Public methods
build
funbuild(): TestSuite!
Deprecated: Deprecated in Java.
Call this method once you've configured your builder as desired.
Return | |
---|---|
TestSuite! |
The suite containing the requested tests. |
excludePackages
open funexcludePackages(vararg packageNames: String!): TestSuiteBuilder!
Deprecated: Deprecated in Java.
Exclude all tests in the given packages and all sub-packages, unless otherwise specified.
Parameters | |
---|---|
packageNames |
String!: Names of packages to remove. |
Return | |
---|---|
TestSuiteBuilder! |
The builder for method chaining. |
includeAllPackagesUnderHere
funincludeAllPackagesUnderHere(): TestSuiteBuilder!
Deprecated: Deprecated in Java.
Include all junit tests that satisfy the requirements in the calling class' package and all sub-packages.
Return | |
---|---|
TestSuiteBuilder! |
The builder for method chaining. |
includePackages
open funincludePackages(vararg packageNames: String!): TestSuiteBuilder!
Deprecated: Deprecated in Java.
Include all tests that satisfy the requirements in the given packages and all sub-packages, unless otherwise specified.
Parameters | |
---|---|
packageNames |
String!: Names of packages to add. |
Return | |
---|---|
TestSuiteBuilder! |
The builder for method chaining. |
named
open funnamed(newSuiteName: String!): TestSuiteBuilder!
Deprecated: Deprecated in Java.
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.
Parameters | |
---|---|
newSuiteName |
String!: Prefix of name to give the suite being built. |
Return | |
---|---|
TestSuiteBuilder! |
The builder for method chaining. |
Protected methods
getSuiteName
protected open fungetSuiteName(): String!
Deprecated: Deprecated in Java.
Subclasses use this method to determine the name of the suite.
Return | |
---|---|
String! |
The package and suite name combined. |