Member-only story

Organize your tests in Xcode using Test Plans

How can we run our tests under different scenarios and configurations using Xcode Test Plans

4 min readMar 6, 2024

--

Working on big projects has several challenges attached.

One of those is ensuring the quality of the code before shipping a new build to production. Having a solid test structure in place could help. With a solid structure, I mean not only having both Unit Tests & UI Tests but also testing our app under different configurations.

This way, we’ll cover as many scenarios as possible, and by default, we’ll improve our app’s quality.

Here’s when we can leverage Test Plans.

Let’s see how we can add them to our projects.

Image by Author

Introduction to Test Plans

A test plan is a document where we specify which tests we want to run and which configurations we should use.

That’s it.

All test plans have a shared configuration and as many custom configurations as we want. Having custom configurations is optional, but if the test plan has at least one, it will override the shared configuration.

Each test plan has one or more test bundles. It could be Unit Test Bundle or UI Test Bundle.

--

--

Bruno Lorenzo
Bruno Lorenzo

Written by Bruno Lorenzo

Software Engineer | Co-creator of https://carry-on.app - A travel planner app | Former iOS Tech Lead | I write about iOS, tech, and producitivy

Responses (1)