Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode project scheme is not currently configured for the test action

I am trying to run an Xcode unit test for my iOS application. I am willing to do it on an iPad connected via USB to a Mac. I am trying to run the test from the command line in order to trigger it from Jenkins later on.

Below is what I'm currently typing into the command line and the error I'm getting. Please help.

The code:

xcodebuild test -scheme MyApplication -destination "platform=iOS,name=iPad"

The error:

Scheme MyApplication is not currently configured for the test action

like image 873
danR Avatar asked May 27 '15 11:05

danR


3 Answers

For me the problem was that no tests were added to my scheme:

Scheme Editor

By adding test bundles to my scheme via the '+' button then the scheme could be built by Xcode and xcodebuild.

like image 162
David Hunt Avatar answered Oct 18 '22 05:10

David Hunt


For everyone struggling with this problem.

My solution was to:

  1. Select Test Target
  2. Manage Scheme
  3. Select Run in the left menu
  4. Select Info in the tab
  5. Choose Executable Target from the dropdown menu
  6. Hit Close.
like image 29
dan Avatar answered Oct 18 '22 04:10

dan


Fixed this up by removing duplicate schemes from Xcode. The schemes can be added/removed/shared/edited in Xcode via Product -> Scheme -> Manage Schemes.

like image 18
danR Avatar answered Oct 18 '22 03:10

danR