【发布时间】:2014-08-09 09:40:29
【问题描述】:
当我使用测试时 - 我在特殊模块中添加类并运行测试配置。类扩展(例如)TestCase 并运行良好。
但是当我扩展 UiAutomatorTestCase - 我得到错误
java.lang.RuntimeException: Stub!
at com.android.uiautomator.testrunner.UiAutomatorTestCase.<init> (UiAutomatorTestCase.java:5) ...
我的简单课:
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
public class AutoTest extends UiAutomatorTestCase {
public void testSome() throws UiObjectNotFoundException {
getUiDevice().pressHome();
}
}
如何在 Android Studio IDE 中运行?
【问题讨论】:
-
我想知道为什么没有人回答这个问题...你明白了吗?
-
@TimBo 不,我不 =( 只使用简单的 TestCase...
标签: android unit-testing android-studio android-uiautomator