【问题标题】:Unit testing the android platform对安卓平台进行单元测试
【发布时间】:2010-07-14 14:54:46
【问题描述】:

所以,我终于可以搭建和调试android平台了(过程可以看here)。现在,问题是:单元测试在哪里,如何启动它们以及在哪里看到结果?

另外,有没有关于安卓平台架构的指南?

【问题讨论】:

    标签: android unit-testing platform


    【解决方案1】:

    我想没有办法在 Android src 上运行每个单元测试。

    我不了解 C 代码,但您可以看到在一些 git 存储库中包含像 Contacts 这样的 Android 应用程序,它们有一个测试文件夹,这是一个 android 测试项目。您可以查看如何运行它们here

    【讨论】:

    • 我正在尝试使用(例如)adb shell am instrument -w com.android.email.tests/android.test.InstrumentationTestRunner 为这些应用程序运行单元测试,但它告诉我,INSTRUMENTATION_STATUS: id=ActivityManagerService INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.android.email.tests/android.test.InstrumentationTestRunner} INSTRUMENTATION_STATUS_CODE: -1android.util.AndroidException: INSTRUMENTATION_FAILED: com.android.email.tests/android.test.InstrumentationTestRunner 这里有什么问题?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-28
    • 1970-01-01
    • 2021-09-18
    • 1970-01-01
    • 2012-01-08
    • 1970-01-01
    相关资源
    最近更新 更多