相关疑难解决方法(0)

Android 测试:未找到测试

Starting 0 tests on test(AVD) - 10
Tests on test(AVD) - 10 failed: Instrumentation run failed due to 'Process crashed.'

com.android.build.gradle.internal.testing.ConnectedDevice > No tests found.[test(AVD) - 10] FAILED 
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).
Run Code Online (Sandbox Code Playgroud)

所以我在 CI 上运行测试,这个错误随机弹出,有时它会找到 2 个测试并运行它。但大多数时候我都会得到这个。

testing android

15
推荐指数
1
解决办法
3595
查看次数

Gradle:没有找到测试

当我尝试通过执行以下命令来运行Android测试时:

./gradlew connectedDebugAndroidTest
Run Code Online (Sandbox Code Playgroud)

发生以下错误:

com.android.builder.testing.ConnectedDevice > No tests found.[devicename] FAILED
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).
:connectedDebugAndroidTest FAILED

FAILURE: Build failed with an exception.
Run Code Online (Sandbox Code Playgroud)

还没有做出任何更改build.gradlegradle-wrapper.properties文件.

通过将所有内容更新到最新版本(gradle,android插件,构建工具等)无法解决问题

所有测试以前都是成功的.什么可能导致这种神秘回归?谢谢.

android android-testing build.gradle android-gradle-plugin

11
推荐指数
2
解决办法
6104
查看次数

Espresso 测试未在 Android Studio 中运行

我正在 android studio 中为我的应用程序进行一些 espresso 测试,它正在工作并突然停止工作,基本上测试构建并启动,但它卡在测试结果中并且什么也不显示,我的意思是它显示没有测试通过。如果有人可以帮助我,我将不胜感激,谢谢

  • 这是我的 android studio 的屏幕截图(它显示启动成功但测试未开始)

在此输入图像描述

android kotlin android-studio android-espresso

6
推荐指数
1
解决办法
2816
查看次数