我正在尝试通过 Eclipse 将我的测试类作为 Android Junit Test 运行,然后它找不到测试类异常。
我已经在我的生产代码包中正确提到了检测目标包。
下面是android list
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="15" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.abc.android" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="android.test.runner" />
</application>
我还检查了构建路径,它正确地包含了目标类,以便可以找到类文件。
找不到问题所在。
感谢和问候, 索拉夫
最佳答案
我删除了我的项目并从我的源代码库中获取了最新版本。
然后我运行了我的测试,它确实有效。
但想知道为什么会出现问题。
从 Eclipse 运行时,Android junit 测试在哪里选择它的类?...我假设它的 bin/classes 在构建路径中...无法弄清楚问题是什么
关于android - 运行 Android Junit 时找不到测试类异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20215252/