Method setUp in android.test.AndroidTestCase not mocked

后端 未结 3 1905
伪装坚强ぢ
伪装坚强ぢ 2021-02-20 02:29

I\'m trying to come to terms with the new unit test feature of Android Studio. I\'ve followed the instructions on http://tools.android.com/tech-docs/unit-testing-support. The d

3条回答
  •  南笙
    南笙 (楼主)
    2021-02-20 02:56

    As of SDK version 24, AndroidTestCase is deprecated

    This class was deprecated in API level 24.

    Use InstrumentationRegistry instead. New tests should be written using the Android Testing Support Library.

    You are supposed to use the Espresso framework for UI testing. There is a tutorial.

提交回复
热议问题