DEV Community

Cover image for The Ultimate guide to iOS unit testing with best practices — Part 2
Raksha for Canopas Software

Posted on

The Ultimate guide to iOS unit testing with best practices — Part 2

This is an ongoing series on writing Unit tests with best practices where we develop a TODO app with Effective tests.

This article covers implementation of Add task screen with unit tests. We will also see how we can navigate back and forth very easily with UIPilot and how to write tests for navigation.

This post is divided into 6 small steps to make explanation easier.

  1. Make UIPilot available in ViewModel
  2. Add button on list screen
  3. Implement Add Task screen UI
  4. Implement Add Task ViewModel
  5. Write tests for Add Task ViewModel
  6. Refresh list screen after task is added

Feel free to jump/skip steps you are already familiar with.

Check out the source code on Github.

Check out full article to write iOS unit test with best practices.

Top comments (0)