Arash Afsharpour
Arash Afsharpour

Reputation: 1302

What is "Include UI Tests" Checkbox for in Xcode?

I searched for it I didn't find anything specific about it. What is the use of "Include UI Tests" checkbox? Should I check it while starting a new project or not?

Upvotes: 3

Views: 2449

Answers (1)

Tomn
Tomn

Reputation: 208

UI (User Interface) Testing provides way to validate visual components and behaviors in your app. Like verifying a message is displayed when you tap a button.

It's the same as the checkbox above “Include Unit Tests”, which provides a target where you can write code that validates parts of your application code.

I'd suggest to let it checked, as it is useful to test apps. But if you don't use it, you can totally ignore the UITests target and folder in your project.

If you don't check it, you can still add (UI) tests later in File › New › Target… › Testing Bundle

You can learn more about Xcode UI testing here: https://developer.apple.com/videos/play/wwdc2015/406/

Or there: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/09-ui_testing.html

Upvotes: 6

Related Questions