lwalukie
lwalukie

Reputation: 99

How to config scheme in Xcode to always run unit test before archive?

I want to automatically run unit tests when archiving in Xcode. My goal is to have unit tests run when I click the "archive" menu command and, if those tests succeed, the archive process will follow. If the tests fail, the archive will be aborted.

Upvotes: 3

Views: 1637

Answers (2)

billibala
billibala

Reputation: 321

Seems like it's just one setting called "Test after build" in Xcode. Someone posted a blog about it.

Upvotes: 0

kkumpavat
kkumpavat

Reputation: 452

Select you scheme and go to edit scheme and select "Build". Check mark Archive for Unit test case target as shown in below image.

enter image description here

Upvotes: 1

Related Questions