Questions tagged «android-uiautomator»

18
无法解析符号“ AndroidJUnit4”
显然,我需要正确的导入语句才能解决此问题。根据的文档AndroidJUnit4,这应该是 import android.support.test.runner.AndroidJUnit4; 当我这样做时,Android Studio会runner以红色突出显示并抱怨“无法解析符号“运行器””。 背景 通过遵循Android Developer网站上的教程使用UI Automator设置测试,我达到了这一点。我遇到的第一个问题是,com.android.support:support-v4:22.2.0并且com.android.support.test:runner:0.2依赖于不同版本的com.android.support:support-annotations。我遵循了这个Android错误报告中的建议,并allprojects在我的项目中添加了以下内容build.gradle: configurations.all { resolutionStrategy.force 'com.android.support:support-annotations:22.1.0' } 这解决了立即出现的错误,但我怀疑它会导致当前的问题。有人对如何解决此问题有任何建议吗? 从`./gradlew:app:dependencies中删除部分 androidTestCompile - Classpath for compiling the androidTest sources. +--- com.jayway.android.robotium:robotium-solo:5.2.1 +--- com.squareup:fest-android:1.0.8 | \--- org.easytesting:fest-assert-core:2.0M10 | \--- org.easytesting:fest-util:1.2.5 +--- com.android.support.test:runner:0.2 | +--- junit:junit-dep:4.10 | | \--- org.hamcrest:hamcrest-core:1.1 | +--- com.android.support.test:exposed-instrumentation-api-publish:0.2 | \--- com.android.support:support-annotations:22.0.0 -> …

7
Android测试:UIAutomator与Espresso
我正在寻求适用于Android的UI自动化测试框架,我偶然发现了UI Automator和Espresso,这是我感到困惑的部分- 两者均由Google维护 两者都用于功能UI测试 两者都是Android框架 所以我的问题/疑问是- UI Automator和之间的主要区别是Espresso什么? 是否需要修改源代码以集成任何这些框架? 一个框架比另一个框架具有任何优势吗?如果是,那么哪个框架最适合Android应用程序的UI自动化?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.