public
abstract
@interface
SmallTest
implements
Annotation
android.support.test.filters.SmallTest
Annotation to assign a small test size qualifier to a test. This annotation can be used at a
method or class level.
Test size qualifiers are a great way to structure test code and are used to assign a test to a
test suite of similar run time.
Execution time: <200ms
Small tests should be run very frequently. Focused on units of code to verify specific logical
conditions. These tests should runs in an isolated environment and use mock objects for external
dependencies. Resource access (such as file system, network, or databases) are not permitted.
Tests that interact with hardware, make binder calls, or that facilitate android instrumentation
should not use this annotation.
Note: This class replaces the deprecated Android platform size qualifier
android.test.suitebuilder.annotation.SmallTest and is the recommended way to annotate tests
written with the Android Testing Support Library.
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,["# SmallTest\n\nSummary: [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nSmallTest\n=========\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\n\n\nabstract\n@interface\nSmallTest\n`\n\n\n`\n\n\nimplements\n\n`[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)`\n\n\n`\n\n|----------------------------------------|\n| android.support.test.filters.SmallTest |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAnnotation to assign a small test size qualifier to a test. This annotation can be used at a\nmethod or class level.\n\nTest size qualifiers are a great way to structure test code and are used to assign a test to a\ntest suite of similar run time.\n\nExecution time: \\\u003c200ms\n\nSmall tests should be run very frequently. Focused on units of code to verify specific logical\nconditions. These tests should runs in an isolated environment and use mock objects for external\ndependencies. Resource access (such as file system, network, or databases) are not permitted.\nTests that interact with hardware, make binder calls, or that facilitate android instrumentation\nshould not use this annotation.\n\nNote: This class replaces the deprecated Android platform size qualifier [android.test.suitebuilder.annotation.SmallTest](http://developer.android.com/reference/android/test/suitebuilder/annotation/SmallTest.html) and is the recommended way to annotate tests\nwritten with the Android Testing Support Library.\n\nSummary\n-------\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[java.lang.annotation.Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)` ` |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` abstract `[Class](https://developer.android.com/reference/java/lang/Class.html)`\u003c? extends `[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)`\u003e` | ` annotationType() ` | | ` abstract boolean` | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` abstract int` | ` hashCode() ` | | ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` toString() ` | ||\n\n-\n\n Annotations\n -----------\n\n - [FlakyTest](/reference/android/support/test/filters/FlakyTest)\n - [LargeTest](/reference/android/support/test/filters/LargeTest)\n - [MediumTest](/reference/android/support/test/filters/MediumTest)\n - [RequiresDevice](/reference/android/support/test/filters/RequiresDevice)\n - [SdkSuppress](/reference/android/support/test/filters/SdkSuppress)\n - [SmallTest](/reference/android/support/test/filters/SmallTest)\n - [Suppress](/reference/android/support/test/filters/Suppress)"]]