Previously these annotations were in the android.test.suitebuilder.annotation
package. As of API 24, they were moved to the android.support.test.filters
package (documented here for @MediumTest
. @SmallTest
and @LargeTest
are the same).
To use the new versions:
- Be sure you’re using
import android.support.test.filters.<size>Test
at the top of your test file. - Ensure your test
runner
andrules
versions are using at least version 0.5 in yourbuild.gradle
file:
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'