繁体   English   中英

不能再在 Android Studio 中运行单独的仪器测试

[英]Can no longer run individual instrumented tests in Android Studio

大约两个月以来,我一直无法在 Android Studio 中运行单独的 UI 测试。 右键单击测试名称,然后run <test name>只是给我错误No tests were found 如果我右键单击 class 名称,然后单击run <testing class name> ,它会成功运行 class 中的所有测试。 因此,为了仅在 class 中运行单个测试,我必须诉诸注释掉我不想运行的所有测试,然后单击 class 名称中的运行,这很痛苦。 这在几个月前曾经工作得很好。

我真的没有更多关于 go 的信息了。 唯一的 output 是

Connected to the target VM, address: '127.0.0.1:49178', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:49178', transport: 'socket'

Process finished with exit code 1
Class not found: "com.mypackagename.android.TestClassName"

甚至多年后(2022 年 8 月),与最新的 Android Studio IDE 相同的问题;

根据我的经验,Android Studio 3.x 仍然能够运行单个测试(无论是单个测试方法还是单个测试类)。

我将尝试更新 Gradle,如果有帮助,请报告;-)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM