Writing unit tests and UI Tests sometimes can be tricky. Many times, tests pass locally but fail in CI which makes them harder to debug. Other times, tests crash in the CI environment, but never on your Mac. Also, working with CoreData and creating mock objects and clearing them after each test requires some extra steps in the app design. This talk is going over these and talk about approaches that helped us at Zocdoc to resolve them.