【发布时间】:2015-11-12 18:11:31
【问题描述】:
我可以使用以下命令单独运行我的测试:
C:\Google Drive\Testing>adb -s C4F12CC05723D6E shell am instrument -w -e class c
om.example.project.test.testcases.basictests.Test1 com.example.
project.test/android.support.test.runner.AndroidJUnitRunner
com.example.project.test.testcases.basictests.test1:.
Time: 23.807
OK (1 test)
但我无法运行套件中的所有测试:
C:\Google Drive\Testing>adb -s C4F12CC05723D6E shell am instrument -w com.example
.project.test/android.support.test.runner.AndroidJUnitRunner
Time: 0
OK (0 tests)
我在尝试运行一组测试时得到了相同的结果。
跑步者似乎没有抱怨什么,它只是认为有0个测试,当有几个时。
我在 android studio 中运行测试时遇到了同样的问题,我可以运行单个测试,但不能运行完整套件或完整包。
我正在使用 espresso 2,它使用 AndroidJUnitRunner。
测试包与正在测试的应用程序在同一个项目中。包括主要活动在内的核心应用活动位于 com.example.project 中,测试包是它的子包; com.example.project.test
我该如何调查这个问题?
【问题讨论】:
标签: android testing command-line adb android-espresso