I wanted to run the following test:
package com.xxx.yyy;
import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runn
androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
androidTestImplementation "androidx.test:runner:1.3.0"
androidTestImplementation "androidx.test:core:1.3.0"
androidTestImplementation "androidx.test.ext:junit:1.1.2"
androidTestImplementation "androidx.test:rules:1.3.0"
except for the androidx.test.runner.AndroidJunitRunner config, please also check the dependency. The above code is worked for me.