Stay organized with collections
Save and categorize content based on your preferences.
InstrumentationTestSuite
open class InstrumentationTestSuite
A junit.framework.TestSuite that injects android.app.Instrumentation
into InstrumentationTestCase
before running them.
Summary
Public methods |
open Unit |
|
open Unit |
runTest(test: Test!, result: TestResult!)
|
Public constructors
InstrumentationTestSuite
InstrumentationTestSuite(instr: Instrumentation!)
Parameters |
instr |
Instrumentation!: The instrumentation that will be injected into each test before running it. |
InstrumentationTestSuite
InstrumentationTestSuite(
theClass: Class<Any!>!,
instr: Instrumentation!)
Parameters |
theClass |
Class<Any!>!: Inspected for methods starting with 'test' |
instr |
Instrumentation!: The instrumentation to inject into each test before running. |
Public methods
addTestSuite
open fun addTestSuite(testClass: Class<Any!>!): Unit
Deprecated: Deprecated in Java.
runTest
open fun runTest(
test: Test!,
result: TestResult!
): Unit
Deprecated: Deprecated in Java.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# InstrumentationTestSuite\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nInstrumentationTestSuite\n========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/test/InstrumentationTestSuite \"View this page in Java\") \n\n```\nopen class InstrumentationTestSuite\n```\n\n|---|--------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.test.InstrumentationTestSuite](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 24.**\n|\n| Use [InstrumentationRegistry](https://developer.android.com/reference/android/support/test/InstrumentationRegistry.html) instead. New tests should be written using the [Android Testing Support Library](https://developer.android.com/tools/testing-support-library/index.html).\n\nA junit.framework.TestSuite that injects [android.app.Instrumentation](../app/Instrumentation.html#) into [InstrumentationTestCase](/reference/kotlin/android/test/InstrumentationTestCase) before running them.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [InstrumentationTestSuite](#InstrumentationTestSuite(android.app.Instrumentation))`(`instr:` `[Instrumentation](../app/Instrumentation.html#)!`)` \u003cbr /\u003e |\n| [InstrumentationTestSuite](#InstrumentationTestSuite(java.lang.Class,%20android.app.Instrumentation))`(`theClass:` `[Class](../../java/lang/Class.html#)\u003c[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!\u003e!`, `instr:` `[Instrumentation](../app/Instrumentation.html#)!`)` \u003cbr /\u003e |\n| [InstrumentationTestSuite](#InstrumentationTestSuite(kotlin.String,%20android.app.Instrumentation))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `instr:` `[Instrumentation](../app/Instrumentation.html#)!`)` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addTestSuite](#addTestSuite(java.lang.Class))`(`testClass:` `[Class](../../java/lang/Class.html#)\u003c[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!\u003e!`)` \u003cbr /\u003e |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [runTest](#runTest(Test,%20TestResult))`(`test:` `Test!`, `result:` `TestResult!`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### InstrumentationTestSuite\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nInstrumentationTestSuite(instr: Instrumentation!)\n```\n\n| Parameters ||\n|---------|-------------------------------------------------------------------------------------------------------------------------------|\n| `instr` | [Instrumentation](../app/Instrumentation.html#)!: The instrumentation that will be injected into each test before running it. |\n\n### InstrumentationTestSuite\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nInstrumentationTestSuite(\n theClass: Class\u003cAny!\u003e!, \n instr: Instrumentation!)\n```\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `theClass` | [Class](../../java/lang/Class.html#)\\\u003c[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!\\\u003e!: Inspected for methods starting with 'test' |\n| `instr` | [Instrumentation](../app/Instrumentation.html#)!: The instrumentation to inject into each test before running. |\n\n### InstrumentationTestSuite\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nInstrumentationTestSuite(\n name: String!, \n instr: Instrumentation!)\n```\n\nPublic methods\n--------------\n\n### addTestSuite\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun addTestSuite(testClass: Class\u003cAny!\u003e!): Unit\n```\n\n**Deprecated:** *Deprecated in Java.* \n\n### runTest\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun runTest(\n test: Test!, \n result: TestResult!\n): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*"]]