Go to each of your test targets (e.g. MyProjectTests and MyProjectUITests) in the project settings and select “None” for the “Target Application” dropdown.
Then reselect your Target Application back for the same targets.
This should reset the test targets and make XCode less confused.