© Avi Tsadok 2020
A. TsadokPro iOS Testinghttps://doi.org/10.1007/978-1-4842-6382-2_4

4. Writing Tests – Advanced Techniques

Avi Tsadok1 
(1)
Tel Mond, Israel
 

More than the act of testing, the act of designing tests is one of the best bug preventers known. The thinking that must be done to create a useful test can discover and eliminate bugs before they are coded – indeed, test-design thinking can discover and eliminate bugs at every stage in the creation of software, from conception to specification, to design, coding and the rest.

—Boris Beizer

Introduction

In the previous chapter, we’ve learned how to write basic unit tests. But in reality, we encounter more significant problems – we need to fake or mock certain parts of our code or compare values. ...

Get Pro iOS Testing: XCTest Framework for UI and Unit Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.