我需要一些建议和指导相关的Android应用程序TDD的Android应用程序
我正在开发一个复杂的Android应用程序(一种自动化的机器人播放器的网页游戏)TDD。现在我有一个试点,在开始之前继续它的发展,我想为它做完整的TDD。
该应用的主要目的是运行作为与HTTP服务器进行通信的后台服务 - 这将发送HTTP请求使用JSON内容
它有两种模式运行:
- service mode - it will run in background- read some data configuration from database and communicate with the server
- GUI mode - communication with server on demand + configuration for running in service mode.
GUI层被设计为MVP,所以在一个模块(一个MVP单元)中完成的所有业务都与视图分离,因此,所有应用逻辑都是“不依赖于Android”。
我有我需要做单元测试的几大层次:
- domain data access :
database storage (ormlite)
android specific storage - shared prefs..,
files
- server communication - http client (spring android rest template)
http content conversion (gson)
- background services - android services
- GUI - activities
- app business - android independent - algorithms, computations, ...
总之需要TDD - 为每一个这些层的独立,而且还集成测试的完整流程。
测试包括:
- database DAO tests
- http client requests
- GSON conversion TDDs
- business logic - simple tests for methods
- unit testsfor running and scheduled background services
- activity unit testing
- test suites (service + DAO + json conversion + http requests)
我的第一个问题是什么TDD框架将是最适合我的需要?我应该用嘲笑吗?
请给我一些方向去。谢谢