Stack Exchange
Cannot resolve symbol testing in import statement
Getting error cannot resolve testing in my UnitTestClass

This my build dependency for test:
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test:rules:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.0'
    // Required -- JUnit 4 framework
    testImplementation 'junit:junit:4.12'
    // Optional -- Robolectric environment
//    testImplementation 'androidx.test:core:1.0.0'
    // Optional -- Mockito framework
    testImplementation 'org.mockito:mockito-core:1.10.19'
    androidTestImplementation 'org.hamcrest:hamcrest-library:1.1'
    testImplementation ('com.squareup.assertj:assertj-android:1.0.0') {
        exclude module: 'support-annotations'
    }
    debugImplementation ('androidx.fragment:fragment-testing:1.2.5')
    testImplementation 'androidx.test.ext:junit:1.1.1'
    testImplementation 'org.robolectric:robolectric:4.3.1'
    testImplementation 'androidx.arch.core:core-testing:2.1.0'

Also added this
testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }


Add this to your dependencies
def fragment_version = "1.2.5"
debugImplementation "androidx.fragment:fragment-testing:$fragment_version"

You can find more information in this link
