Xcode Command Line Tool (XCode 4.6) Running Module Tests from a Terminal

after many attempts, I did not understand how I can run unit tests with a terminal with a project located inside the workspace. I tried to create a new circuit and run this script, which builds but does not run any tests:

export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/ xcodebuild -workspace MyProject.xcworkspace\ -scheme MyProjectLogicTests\ -sdk iphonesimulator\ -configuration Debug\ ONLY_ACTIVE_ARCH=NO\ TEST_AFTER_BUILD=YES\ RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES\ clean build 
+4
source share
1 answer

You can also upgrade to Xcode 5, which allows you to execute the command:

 xcodebuild test -scheme SomeTestScheme -destination "name=iPhone Retina (4-inch)" 

Note. The destination parameter must match the visible name for the destination to which you want to run a test run.

+7
source

Source: https://habr.com/ru/post/1469275/


All Articles