I have written instrumentation tests which was working fine, but now getting error cannot resolve ActivityTestRule error after upgrading dependencies to
android
AndroidX Test includes another API,ActivityScenario that is currently in beta. This API works in a variety of testing environments and provides thread safety within the tests that use it. Consider using ActivityScenarioRule or ActivityScenario instead.
import androidx.test.ext.junit.rules.ActivityScenarioRule
ActivityScenarioRule(YourActivity::class.java)