Is it possible to start an application test that runs in the simulator with a terminal command(s)?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, I got it to work. My solution is somehow rough and might not be suitable in every case.
In
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/RunPlatformUnitTestsreplace
with
You may move the fixed user home to a different location, but I think you would need to move the .app and .octest bundles along.
Add
-RegisterForSystemEventsto theOTHER_TEST_FLAGSbuild setting of your test bundle.Make sure your test bundle contains a run script build phase with the contents
Create a new scheme for your tests.
You should be able to run the tests from the command line using the standard xcodebuild:
xcodebuild -workspace $(WORKSPACE_NAME).xcworkspace -scheme $(TEST_SCHEME) -configuration debug -sdk iphonesimulatorThe simulator must not be running, at the time you what to run the tests.
I hope this information is complete, if something doesn’t work as expected please ask.