[android-developers] writing unit tests for some networking code and can't simulate network failures?

2014-01-16 Thread Ken
I'm trying to write some unit tests to handle network outages to see how well the software handles resumes, but can't find a way to simulate this when running a ServiceTestCase. Has anyone ever done this w/ automated unit tests? Or do you just do it manually by mucking w/ settings after a unit

[android-developers] writing unit tests for some networking code and can't simulate network failures?

2014-01-16 Thread Andrew Mackenzie
If http, consider looking at mockwebserver library, from square. I still need to try it, so can't recommend yet - but maybe you can mock the network layer and specific responsws for your unit test. -- You received this message because you are subscribed to the Google Groups Android Developers