All I did was to update the project to Xcode 5. Now when I try to run tests I am getting this error
if [ "${TEST_AFTER_BUILD}" = "YES" ]; then
Error ${LINENO} "RunUnitTests is obsolete. To run unit tests for your target, use the Test scheme action in the Xcode IDE and the test action in xcodebuild."
Note ${LINENO} "You can remove the Run Script build phase that invokes RunUnitTests from your unit test bundle target."
# Exit with EX_UNAVAILABLE to indicate that this subsystem is unavailable.
exit 69
fi
Where Error ${LINENO} "RunUnitTests is obsolete. To run unit tests for your target, use the Test scheme action in the Xcode IDE and the test action in xcodebuild."
is highlighted red. I googled this problem but could not find any answer. What could be the problem and how can I solve it?
You most likely have the build setting Test After Build set to YES. Xcode 5 does not support the Test After Build build setting. Set Test After Build to NO and the error should go away.
Use this command.
xcodebuild test -scheme <YOUR SCHEME NAME HERE> -destination OS=6.1,name=iPhone
I also googled and find this site. http://petosoft.wordpress.com/2013/06/25/running-unit-tests-using-jenkins-and-xcodebuild-on-xcode-5-0/
The TEST_AFTER_BUILD option becomes user defined settings in Xcode 5. Just delete it will be ok.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With