Specifies the name of a concept being tested. Use this if methodName is not accurate enough. E.g. for java.util.regex.Pattern#compile(String)methodName is not sufficient since the String contains a pattern with its own syntax which has to be tested with different aspects. Areas concerned are e.g. JDBC (SELECT, INSERT, UPDATE, DELETE, ...), regex (character sets, operators,...), formatters (DecimalFormat, DateFormat, ChoiceFormat, ...), ...
Specifies the name of the method that is being tested.
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,["# TestTarget\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nTestTarget\n==========\n\n```\n@Target([AnnotationTarget.ANNOTATION_CLASS]) class TestTarget\n```\n\n|-----------------------------------|\n| [dalvik.annotation.TestTarget](#) |\n\n*** ** * ** ***\n\n| **This annotation was deprecated in API level 14.**\n|\n| Obsolete.\n\nDefines an annotation used be used within the TestInfo annotation. It specifies a single method target for the test (but can be used multiple times).\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [TestTarget](#TestTarget(kotlin.String,%20kotlin.Array,%20kotlin.String))`(`conceptName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `methodArgs:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\u003c[KClass](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/index.html)\u003c*\u003e\u003e`, `methodName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Defines an annotation used be used within the TestInfo annotation. |\n\n| Properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [conceptName](#conceptName:kotlin.String) Specifies the name of a concept being tested. |\n| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[KClass](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/index.html)\\\u003c\\*\\\u003e\\\u003e | [methodArgs](#methodArgs:kotlin.Array) Specifies the signature of the method that is being tested, in terms of Java classes. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [methodName](#methodName:kotlin.String) Specifies the name of the method that is being tested. |\n\nPublic constructors\n-------------------\n\n### TestTarget\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nTestTarget(\n conceptName: String, \n methodArgs: Array\u003cKClass\u003c*\u003e\u003e, \n methodName: String)\n```\n\n**Deprecated:** *Obsolete.*\n\nDefines an annotation used be used within the TestInfo annotation. It specifies a single method target for the test (but can be used multiple times).\n\nProperties\n----------\n\n### conceptName\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval conceptName: String\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nSpecifies the name of a concept being tested. Use this if `methodName` is not accurate enough. E.g. for [java.util.regex.Pattern#compile(String)](../../java/util/regex/Pattern.html#compile(kotlin.String)) `methodName` is not sufficient since the String contains a pattern with its own syntax which has to be tested with different aspects. Areas concerned are e.g. JDBC (SELECT, INSERT, UPDATE, DELETE, ...), regex (character sets, operators,...), formatters (DecimalFormat, DateFormat, ChoiceFormat, ...), ... \n\n### methodArgs\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval methodArgs: Array\u003cKClass\u003c*\u003e\u003e\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nSpecifies the signature of the method that is being tested, in terms of Java classes. \n\n### methodName\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval methodName: String\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nSpecifies the name of the method that is being tested."]]