I really value unit-testing in developing webapps. I haven't had any experience in developing mobile apps. Is there anything that cannot be unit-tested in mobile apps? And what is the workaround for this? Is there any common gotcha that we must be aware in unit-testing mobile apps?
There are few problems with unit-testing mobile apps.
- emulators do not behave exactly like real hardware, there are ocasional incompatibilities;
- some emulators do not throttle the CPU power to emulate limited CPU power of mobile;
- some emulators do not throttle the network to emulate limited throughput and latency of 3G connection;
- in case of Android there is a problem of huge fragmentation both in system version and hardware. It's virtually impossible to test for all.