Gio Lodi 2/16/2016

Why hitting the network is bad for your test, and what to do about it

Read Original

This article discusses the issues with making real network calls in iOS unit tests, such as slow speed, non-deterministic results, and difficulty testing error scenarios. It advocates for following the FIRST testing principles and provides solutions like using stubbing libraries (e.g., OHHTTPStubs) or creating a fake network service via a protocol to isolate tests from network dependencies.

Why hitting the network is bad for your test, and what to do about it

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser