Too Long; Didn't Read
The XCTest library provides a common framework for writing unit tests in Swift for Swift packages and applications. Unit testing can be easily approached when starting for a new project using techniques like Test Driven Development, Protocol Oriented Programming and Dependency Injection. Unit test cases should be completely independent of one another because they execute asynchronously. Mocking is testing your code logic using dummy data or mocked data gives a near to real simulation of testing. Listing down pieces of code that need to be mocked: Data parsing and data manipulation: Data from APIs, files, cache, DB, local storage, user defaults, shared objects, globals, constants, constants and so on.