Skip to content

Create the Integration Tests Target

Jeffrey Wear edited this page May 2, 2014 · 13 revisions

To start using Subliminal, you'll need to create a separate target for your integration tests. To begin, right click your application target and select "Duplicate". (If you get a message about "Transitioning to iPad" just choose "Duplicate Only".)

Rename your new target to "Integration Tests" by selecting it and pressing Enter.

Cleanup

Duplicating the target will have generated a file named <target name> copy-Info.plist. Delete this file. Then, from the "General" tab of your Integration Tests target settings, use the "Choose Info.plist File..." button to select the plist file of your main target. This will keep the plist file of your Integration Tests target in sync with your main target.

Xcode will have created a new scheme for your target named <target name> copy. Click on your current scheme and choose the "Manage Schemes..." option at the bottom of the dropdown menu.

From the resulting modal, select the <target name> copy scheme and press Enter to rename it "Integration Tests".

Then, double-click the scheme, select the "Profile" action, and change the build configuration from "Release" (the default) to "Debug". This will aid in debugging your tests.

You need not worry that building in "Debug" will cause your tests to not reflect the actual "Release" state of the app--subliminal-test will override the configuration to use "Release" when building the app from the command line.

At this point, you should be able to select your Integration Tests scheme and build your app. Make sure this works before moving on.

Create the Integration Tests Directory

Create a group for your integration tests by right clicking on your project, choosing "New Group", and naming it "Integration Tests" (1, in the screenshot below).

Then, use the right sidebar to choose a directory to represent this group (2). From the dropdown menu, choose "New Folder" (3), name it "Integration Tests" (4), and select "Choose" (5).

Next: Install Subliminal

With your Integration Tests target set up, the next step is to install Subliminal. You can install: