3

I have an existing ios application that needs UI tests. I have tried a number of existing libraries and so far everything has been a dead end. The only solutions I have seen thus far involve adding test specific functions to the production code and enabling/disabling them with launch arguments.

Does anyone know of a good way to mock out back-end network calls without polluting my production code with test logic?

So far I have tried:

NSURLSession-MOCK

-Relies on swizzling, which has no effect in UI tests.

OHTTPStubs

-Does not allow upload (PUSH, PUT) requests to be mocked.

idmean
  • 14,540
  • 9
  • 54
  • 83
pbuchheit
  • 1,371
  • 1
  • 20
  • 47

0 Answers0