Testing Tips & Tricks

WWDC 2018

Posted by Den on June 29, 2018 · 4 mins read
Testing Tips & Tricks

Testing Tips & Tricks

WWDC 2018

Testing Tips & Tricks

WWDC 2018

Unit Tests (request, response)

You have to add a glue code to run the UnitTest. 😕

Unit Tests ( URLSession Task )

Integration Tests

Use the URLProtocol.

How to Use URLProtocol

MockURLProtocol
startLoading( )
API Loader Tests

End-to-End Tests

Use the Mock Server instead of a real server.

Working with Notifications

Isolate notifications ( by creating your own NotificationCenter )

Testing Notification Posters
Testing Notification Receivers

Optimizing App Launch When Testing 👍