腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
Android
Kotlin
Espresso
在
单元测试
中
断言
预期
的
活动
是
抛出
错误
android
、
unit-testing
、
kotlin
、
android-espresso
、
instrumented-test
我正在开发一个
Android
应用程序。我正在向我
的
应用程序添加仪表化测试,并测试是否使用
Espresso
启动了
活动
。但在
断言
活动
是
使用
Espresso
测试框架启动时,我得到了
错误
。我将以下express包添加到我
的
应用程序gradle
中
androidTestImplementation "androidx.test.
espresso
:
espresso
-
浏览 24
提问于2019-09-22
得票数 2
回答已采纳
1
回答
在
Android
Espresso
测试中期望异常-失败
android
、
unit-testing
、
kotlin
、
exception
、
android-espresso
我正在使用
Kotlin
在
Espresso
中
为我
的
Android
应用程序编写测试。我希望
在
单元测试
中出现异常,如果发现这样
的
异常,则通过测试。 我做了一个测试,检查Intent extras格式。
在
实现
中
,
在
intent
中
获得不正确
的
值后,我
抛出
了一个异常。我想通过这个异常
抛出
的
测试。extra
浏览 23
提问于2019-01-22
得票数 2
1
回答
Android
单元测试
不会使用正确
的
应用程序类
java
、
android
、
unit-testing
、
robolectric
我正在经历一些奇怪
的
行为,涉及到
android
如何在
单元测试
中选择Application类。 我
在
目录src/testDevelopmentDebug中进行了Robolectric
单元测试
。我还为
单元测试
和
espresso
测试
在
src/testDevelopmentDebug和androidTestDevelopment之间共享了一些测试代码。共享代码
在
src/sharedTest
中
,我
浏览 8
提问于2017-04-03
得票数 1
回答已采纳
3
回答
Espresso
测试
的
正确依赖项是什么?
dependencies
、
android-espresso
在
不同
的
官方
Android
站点上,有关于如何设置
Espresso
测试
的
不同信息:dependencies {}dependencies'com.
andro
浏览 1
提问于2018-05-04
得票数 0
2
回答
Espresso
测试框架匹配(isDisplayed())
是
抛出
错误
android
、
testing
、
android-espresso
、
ui-testing
我对
Espresso
测试非常陌生。我正在尝试下面的测试。2) Textview值
是
正确
的
我用
的
是以下密码。(withId(R.id.textView1)).check(matches(isDisplayed()));上出错了
android
.support.test.
espresso
.NoMatchingViewException:51) at
android
.suppo
浏览 1
提问于2018-10-16
得票数 0
1
回答
单元测试
和UI测试
的
模拟最终类
java
、
android
、
kotlin
、
mockito
、
ui-testing
我正试图为我
的
android
应用程序编写单元和
espresso
UI测试,用
kotlin
构建。因为
在
kotlin
中
,默认情况下每个类都是最终类,所以为了模拟最终类,我使用了支持模拟最终类
的
mockInline库。因为我必须同时编写
单元测试
和UI测试。org.mockito:mockito-inline:2.13.0' androidTestImplementation 'org.mockito:mockito-in
浏览 0
提问于2019-06-06
得票数 2
回答已采纳
1
回答
未解析
的
引用:导航: androidx.navigation.ui.AppBarConfiguration
androidx
在
Android
Studio 3.4
中
。
在
gradle.properties
中
:
android
.enableJetifier=truedependencies:
kotlin
-stdlib-jdk7:$
kotlin
_version" implementation 'com.
andr
浏览 39
提问于2019-07-05
得票数 1
回答已采纳
1
回答
更改现有项目配置
的
Facebook集成
android
、
facebook
、
kotlin
、
ads
我用
Kotlin
编写了一个应用程序,它具有所有的集成功能,使用片段/
活动
。现在我正在集成,但是一旦依赖关系得到同步,应用程序代码就开始
在
构建时
抛出
编译
错误
。implementation 'com.facebook.
android
:facebook-
android
-sdk:[4,5)' 其中大多数都与我如何跨应用程序使用
kotlin
空
断言
有关。任何可能性FB更改默认属性,但这是如何可能
的
,
浏览 1
提问于2018-02-05
得票数 0
回答已采纳
1
回答
如何在
android
studio
中
编写UI测试用例时截取截图
android
、
kotlin
问:如何在
android
studio中使用
espresso
工具、
kotlin
语言和robolectric测试用例为移动
android
应用程序编写UI测试用例时捕获屏幕截图- 1.我正在使用
android
studio、
kotlin
语言和robolectric形式编写测试用例- act、arrange和assert
android
UI测试用例。
在
模拟器上运行测试用例,在行为
中
运行真实设备-
在
排列
中
登
浏览 17
提问于2019-08-23
得票数 0
15
回答
带有id和activity_main
的
kotlin
中
的
未解析引用
java
、
android
、
kotlin
实际上,我正在
kotlin
中
创建一个新
的
应用程序,
在
带有格式化信息
的
框
中
显示xml文件。问题
是
,当我构建应用程序时,有一个activity_main,返回“未解决引用”
的
idUnresolved reference: id
浏览 12
提问于2019-10-29
得票数 33
回答已采纳
7
回答
Android
:
错误
未解决引用: DaggerAppComponent
android
、
android-studio
、
kotlin
、
dagger-2
今天,我已经将
Kotlin
插件安装到了Dagger 2
的
现有项目中。
在
Kotlin
安装之前,我对Dagger没有任何问题。classpath "org.jetbrains.
kotlin
:
kotlin
-
android
-extensions:$
kotlin
_version"kapt { compile fileTree(dir: 'lib
浏览 7
提问于2017-03-16
得票数 37
回答已采纳
2
回答
过渡动画缩放不会禁用应用程序内部
的
动画
android
、
animation
、
navigation
、
android-espresso
我在做一些
Espresso
UI测试时遇到了一个问题:我想在我
的
应用程序
中
禁用动画,这样我就不需要设置超时/需要等待动画完成。
在
我
的
android
设备上禁用开发人员选项
中
的
窗口动画比例、过渡动画比例、动画持续时间比例,
在
使用
android
的
导航组件
在
片段之间导航时,不会禁用动画。slide_out_left" app:popEnterAnim="
浏览 50
提问于2019-12-12
得票数 7
回答已采纳
1
回答
如何在
Kotlin
测试中
断言
TextView
中
的
多行文本
android
、
kotlin
、
junit4
、
android-espresso
输入文本后,用户可以单击next并转到
在
只读TextView
中
包含他们编写
的
文本
的
活动
。val textToPass = "This is a\nmulti line\nstr
浏览 21
提问于2021-07-15
得票数 0
3
回答
当
android
3.2
在
3.1.4上更新时,就会出现明显
的
合并问题
android
、
android-studio
、
android-gradle-plugin
、
material-design
、
build.gradle
我想使用最新
的
android
studio,我
在
升级后导入了旧版本代码并更新了
android
studio,我
在
gradle
android
studio更新后遇到了以下
错误
<?xml version="1.0" encoding="utf-8"?tools:replace=&qu
浏览 2
提问于2018-09-26
得票数 1
回答已采纳
1
回答
插装测试将在
Android
3(空测试套件)上作为本地
单元测试
运行
java
、
android
、
unit-testing
、
android-studio
、
kotlin
我
在
AndroidStudio3.0.1和
Kotlin
中
运行Instrumentation Tests时遇到了一些问题(以前
的
Android
和Java没有这样
的
问题)。首先,它希望
在
控制台中运行测试,而不打开模拟器或将apk包部署到设备(因为它只是一个正常
的
本地
单元测试
)。我想在Edit Configuration选项
中
强制一个仪表运行程序(例如,类似于 ),但是
在
新
的
An
浏览 0
提问于2018-01-23
得票数 3
1
回答
在运行JUnit 5测试时,测试类只能有一个构造函数
错误
。
kotlin
、
junit
、
junit5
有人能解释为什么我
在
代码下面运行时会出现这个
错误
吗?获得与其他注释相同
的
错误
(例如@MethodSource,@CsvSource)@CsvSource("文件和附加
的
错误
屏幕截图。我没有
在
AndridjUnit4ClassRunner
中
引用junit 4为什么要为build.gradle
抛出
错误
implem
浏览 2
提问于2020-10-17
得票数 1
1
回答
适用于androidTest
中
URL.readText
的
FileNotFoundException
android
、
kotlin
、
android-testing
在
Android
应用程序
中
,当我使用
单元测试
中
的
Kotlin
类,模拟
android
.util.Base64时,测试
是
成功
的
。
在
以下情况下,将测试作为androidTest运行失败:为https url
抛出
FileNotFoundException。清单具有网络权限(如果没有,则
错误
是</em
浏览 0
提问于2018-11-13
得票数 0
1
回答
如何在最近
的
任务列表
中
删除我
的
任务
android
、
android-activity
下面
是
测试
活动
的
excludeFromRecents属性
的
示例应用程序(它是由studio生成
的
) 而按照编码,MainActivity不应该显示
在
最近
的
列表
中
。我用launchMode测试了两个
活动
,noHistory(这是带有动画
的
删除任务,但这不是我想要
的
,它不应该从一开始就显示出来),autoRemoveFromRecents(这只适用于完成
的
活动
,而不是
浏览 1
提问于2020-08-30
得票数 1
回答已采纳
5
回答
无法为参数junit:junit:4.12找到方法testImplementation()
android-studio
、
android-gradle-plugin
、
build.gradle
我刚刚更新了我
的
android
工作室并创建了新
的
项目,但是我现在得到了这个
错误
:apply plugin: 'com.
android
.application' compileSdkVersion 28 i
浏览 0
提问于2019-01-16
得票数 0
回答已采纳
1
回答
在
intellij 16
中
创建
android
应用程序时,Gradle同步失败
android
、
intellij-idea
、
gradle
我正在使用Intellij 2016.3.4
在
ubuntu14.04LTS上开发
android
应用程序。一个
错误
- gradle sync failed, missing
android
extension is occurring.apply plugin: '
kotlin
-
android</em
浏览 1
提问于2017-02-19
得票数 1
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Android Weekly Notes Issue#310
拒绝知识盲点 测试相关的方方面面都在这儿
Android UI 自动化测试在 RxImagePicker 中的实践历程
【译】Android测试:Espresso
Python3(9)Python 错误、调试和测试
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券