Stay organized with collections
Save and categorize content based on your preferences.
InstrumentationTestSuite
public
class
InstrumentationTestSuite
extends Object
This class was deprecated
in API level 24.
Use
InstrumentationRegistry instead. New tests should be written using the
Android Testing Support Library.
A ERROR(/junit.framework.TestSuite)
that injects Instrumentation
into
InstrumentationTestCase
before running them.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
InstrumentationTestSuite
public InstrumentationTestSuite (Instrumentation instr)
Parameters |
instr |
Instrumentation : The instrumentation that will be injected into each
test before running it. |
InstrumentationTestSuite
public InstrumentationTestSuite (Class<T> theClass,
Instrumentation instr)
Parameters |
theClass |
Class : Inspected for methods starting with 'test' |
instr |
Instrumentation : The instrumentation to inject into each test before
running. |
InstrumentationTestSuite
public InstrumentationTestSuite (String name,
Instrumentation instr)
Parameters |
name |
String |
instr |
Instrumentation |
Public methods
addTestSuite
public void addTestSuite (Class<T> testClass)
Parameters |
testClass |
Class |
runTest
public void runTest (Test test,
TestResult result)
Parameters |
test |
Test |
result |
TestResult |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# InstrumentationTestSuite\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nInstrumentationTestSuite\n========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/test/InstrumentationTestSuite \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\nclass\nInstrumentationTestSuite\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.test.InstrumentationTestSuite |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This class was deprecated\nin API level 24.** \n\nUse\n[InstrumentationRegistry](/reference/android/support/test/InstrumentationRegistry) instead. New tests should be written using the\n[Android Testing Support Library](/tools/testing-support-library).\n\nA [ERROR(/junit.framework.TestSuite)](/) that injects [Instrumentation](/reference/android/app/Instrumentation) into\n[InstrumentationTestCase](/reference/android/test/InstrumentationTestCase) before running them.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[InstrumentationTestSuite](/reference/android/test/InstrumentationTestSuite#InstrumentationTestSuite(android.app.Instrumentation))`(`[Instrumentation](/reference/android/app/Instrumentation)` instr) ` |\n| ` `[InstrumentationTestSuite](/reference/android/test/InstrumentationTestSuite#InstrumentationTestSuite(java.lang.Class,%20android.app.Instrumentation))`(`[Class](/reference/java/lang/Class)`\u003cT\u003e theClass, `[Instrumentation](/reference/android/app/Instrumentation)` instr) ` |\n| ` `[InstrumentationTestSuite](/reference/android/test/InstrumentationTestSuite#InstrumentationTestSuite(java.lang.String,%20android.app.Instrumentation))`(`[String](/reference/java/lang/String)` name, `[Instrumentation](/reference/android/app/Instrumentation)` instr) ` |\n\n| ### Public methods ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[addTestSuite](/reference/android/test/InstrumentationTestSuite#addTestSuite(java.lang.Class))`(`[Class](/reference/java/lang/Class)`\u003cT\u003e testClass) ` |\n| ` void` | ` `[runTest](/reference/android/test/InstrumentationTestSuite#runTest(Test,%20TestResult))`(Test test, TestResult result) ` |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic constructors\n-------------------\n\n### InstrumentationTestSuite\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic InstrumentationTestSuite (Instrumentation instr)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|-------------------------------------------------------------------------------------------------------|\n| `instr` | `Instrumentation`: The instrumentation that will be injected into each test before running it. \u003cbr /\u003e |\n\n### InstrumentationTestSuite\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic InstrumentationTestSuite (Class\u003cT\u003e theClass, \n Instrumentation instr)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|----------------------------------------------------------------------------------------|\n| `theClass` | `Class`: Inspected for methods starting with 'test' \u003cbr /\u003e |\n| `instr` | `Instrumentation`: The instrumentation to inject into each test before running. \u003cbr /\u003e |\n\n### InstrumentationTestSuite\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic InstrumentationTestSuite (String name, \n Instrumentation instr)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|--------------------------|\n| `name` | `String` \u003cbr /\u003e |\n| `instr` | `Instrumentation` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### addTestSuite\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void addTestSuite (Class\u003cT\u003e testClass)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|----------------|\n| `testClass` | `Class` \u003cbr /\u003e |\n\n### runTest\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void runTest (Test test, \n TestResult result)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|---------------------|\n| `test` | `Test` \u003cbr /\u003e |\n| `result` | `TestResult` \u003cbr /\u003e |"]]