最近两个月,我无法在Android Studio中运行单独的UI测试。右键单击测试名称,然后选择run <test name>
会提示No tests were found
错误。如果我右键单击类名,然后选择run <testing class name>
,它可以成功运行类中的所有测试。因此,为了仅运行类中的某个单一测试,我必须注释掉我不想运行的所有测试,然后从类名处点击运行,这很麻烦。几个月前这还能正常运行。
我真的没有更多信息可供参考。唯一的输出是:
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"