Android Test Driven Development

后端 未结 6 1895
轻奢々
轻奢々 2021-01-29 22:32

I have considerable experience in making Android applications. For my new project, we have decided to do Test Driven Development (TDD). I have been getting my hands wet on Robot

6条回答
  •  孤城傲影
    2021-01-29 23:18

    To do TDD in Android, I personally use all of the following:

    • assertj-android: assertions for Android
    • Mockito: Mocking Framework
    • Robolectric: Unit testing framework that runs without the need of Android emulator
    • Robotium: UI tests (Needs emulator or device to run)

    Also: Using dependency injection libraries such as Dagger or Roboguice will greatly simplify your unit/integration tests. To run tests on multiple devices, consider using Spoon.

提交回复
热议问题