Manifest and setup issues getting Robolectric working with Android Studio 1.1.0

前端 未结 6 1549
盖世英雄少女心
盖世英雄少女心 2021-01-18 07:29

I am trying to get Robolectric tests up and working in our current project, and not having a lot of luck. My preference would be to get these to run within Android Studio 1

6条回答
  •  盖世英雄少女心
    2021-01-18 08:13

    If you are using latest Android Studio(1.2.x), then its better too use RobolectricGradleTestRunner.class It's designed for different build flavors and test flavors. You also need not specify your source manifest. It will pickup the manifest based on your build flavor you are running. This is specially useful when you have different build environments(staging, production) and you want to run your test cases in a specific environment

提交回复
热议问题