How To Test fatalError In Swift

Are you using fatalError functions to enforce the flow of your application and you’re keen to test it? Let’s find out a safe way to do it.

Mock Dependencies: Instance and Metatype Injection With Swift

Do you want to mock all your dependencies to write perfect unit tests? Let’s find out a couple of approaches.

Fake AppDelegate For Unit Testing In Swift

One of the most important things of unit testing is that it shouldn’t have side effects. If you don’t pay attention, you may have unexpected behaviours every time you run your set of tests. A fake `AppDelegate` may solve your problems.

Test Doubles In Swift

A keen developer writes a lot of unit tests to cover the code to use in production. Unfortunately, a component can sometimes be difficult to test because of its dependencies, and you would be tempted to give up. Hang on, Test Doubles are what you need to make a test easy to write.

How to run Swift UI tests with a mock API server

Are you developing an application which uses API responses? Do you need an efficiently way to test the UI? UI testing with a mock API server is the solution to your problems.

© 2021 Marco Santa Dev — Powered by WordPress

Theme by Anders NorenUp ↑