• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Run UiAutomator API from Android Studio (v0.8)

jandorwizard

Lurker
Jul 26, 2014
3
0
When I work with tests - I add class in special module and run test configuration. Class extend (for example) TestCase and work well.

But when I extend UiAutomatorTestCase - I get error

java.lang.RuntimeException: Stub!
at com.android.uiautomator.testrunner.UiAutomatorTestCase.<init> (UiAutomatorTestCase.java:5) ...
My simple class:

import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;

public class AutoTest extends UiAutomatorTestCase {
public void testSome() throws UiObjectNotFoundException {
getUiDevice().pressHome();
}
}
How to run it in Android Studio IDE?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones