简单的 JUnit 测试在 Android Studio 中不起作用
您好,我正在尝试在 Android Studio 中运行基本的 JUnit 测试。当我单击“运行”时,每次在获得结果之前都会终止。我从来没有通过或失败,系统也不会尝试任何其他测试用例。
这是图片。我想知道为什么它不起作用,以便我可以继续练习。
Hi I am trying to run a basic JUnit test in Android Studio. When I click run it is terminated every time before getting results. I never get pass or fail and the system does not try any other test cases.
Here are the pictures. I would like to know why it isn't working so I can keep practicing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试一些方法
用 @SmallTest 装饰您的测试类
尝试从命令行运行您的测试:
You can try a couple of things
Decorate your test class with @SmallTest
Try to run your test from the command line: