logo
logo
AI Products 

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

avatar
Canopas
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.

collect
0
avatar
Canopas
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more