Skip to content

Most visited

Recently visited

navigation
Added in API level 1
Deprecated since API level 24

InstrumentationTestSuite

public class InstrumentationTestSuite
extends TestSuite

java.lang.Object
   ↳ junit.framework.TestSuite
     ↳ android.test.InstrumentationTestSuite


This class was deprecated in API level 24.
Use InstrumentationRegistry instead. New tests should be written using the Android Testing Support Library.

A TestSuite that injects Instrumentation into InstrumentationTestCase before running them.

Summary

Public constructors

InstrumentationTestSuite(Instrumentation instr)
InstrumentationTestSuite(String name, Instrumentation instr)
InstrumentationTestSuite(Class theClass, Instrumentation instr)

Public methods

void addTestSuite(Class testClass)

Adds the tests from the given class to the suite

void runTest(Test test, TestResult result)

Inherited methods

From class junit.framework.TestSuite
From class java.lang.Object
From interface junit.framework.Test

Public constructors

InstrumentationTestSuite

Added in API level 1
InstrumentationTestSuite (Instrumentation instr)

Parameters
instr Instrumentation: The instrumentation that will be injected into each test before running it.

InstrumentationTestSuite

Added in API level 1
InstrumentationTestSuite (String name, 
                Instrumentation instr)

Parameters
name String
instr Instrumentation

InstrumentationTestSuite

Added in API level 1
InstrumentationTestSuite (Class theClass, 
                Instrumentation instr)

Parameters
theClass Class: Inspected for methods starting with 'test'
instr Instrumentation: The instrumentation to inject into each test before running.

Public methods

addTestSuite

Added in API level 1
void addTestSuite (Class testClass)

Adds the tests from the given class to the suite

Parameters
testClass Class

runTest

Added in API level 1
void runTest (Test test, 
                TestResult result)

Parameters
test Test
result TestResult
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.