DEV Community

Cover image for Composing View Controllers pt.4: Integration Tests vs. Contract Tests vs. UI Tests
⛩ Caio Zullo for ⛩ Essential Developer

Posted on • Originally published at essentialdeveloper.com on

1 2

Composing View Controllers pt.4: Integration Tests vs. Contract Tests vs. UI Tests

Watch on YouTube

In this video, we're going to improve our Swift View Controller Lifecycle Observers framework by increasing the test confidence with Integration Tests.

We’re going to discuss the difference between UI Tests , Integration Tests and Contract Tests (Unit Tests). We’ll also bring up some ideas on when to use one over the others.

The tests we wrote in the previous episode are usually called "Unit Tests" but, in the context of our framework, we like to call them “Contract Tests.” We call them “Contract Tests” because they ensure we’re using the UIViewController Container API correctly, as defined in Apple’s documentation (or the contract!).

You can find the source code on GitHub.

Learn more about Implementing a Container View Controller from Apple Docs.

Subscribe now to our Youtube channeland catch free new episodes every week.


Originally published at www.essentialdeveloper.com.

We’ve been helping dedicated developers to get from low paying jobs to high tier roles – sometimes in a matter of weeks! To do so, we continuously run and share free market researches on how to improve your skills with Empathy, Integrity, and Economics in mind. If you want to step up in your career, access now our latest research for free.

Let’s connect

If you enjoyed this article, visit us at https://essentialdeveloper.com and get more in-depth tailored content like this.

Follow us on: YouTubeTwitterFacebookGitHub

Image of Stellar post

Check out Episode 1: How a Hackathon Project Became a Web3 Startup 🚀

Ever wondered what it takes to build a web3 startup from scratch? In the Stellar Dev Diaries series, we follow the journey of a team of developers building on the Stellar Network as they go from hackathon win to getting funded and launching on mainnet.

Read more

Top comments (0)

AWS Security LIVE! Stream

Go beyond the firewall

Watch AWS Security LIVE! to uncover how today’s cybersecurity teams secure what matters most.

Learn More

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay