Reputation: 1190
I'm trying to launch tests from my CI using ios-sim using approach described here: https://confluence.atlassian.com/display/BAMBOO/Xcode , but instead of SenTest
I'm using XCTest
in my application, so last parameter should be not
--args -SenTest All
but something like
-args -XCTest All
and if I use such parameter, not all tests are executed. How can I specify executing all tests using XCtest? If I use
--args -XCTest -test All
none of tests are executed. The full launch command:
ios-sim launch Target.app --devicetypeid 'com.apple.CoreSimulator.SimDeviceType.iPhone-5s, 8.1' --setenv DYLD_INSERT_LIBRARIES="/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection" --setenv XCInjectBundle="UnitTests.xctest" --setenv XCInjectBundleInto="Target.app/Target" --args -XCTest All "UnitTests.xctest"
Upvotes: 2
Views: 1045
Reputation: 23651
2 points:
First off, the reason this is likely failing is because your DYLD_INSERT_LIBRARIES is wrong. You should be using "../../Library/PrivateFrameworks/IDEBund leInjection.framework/IDEBundleInjection" rather than "/../../Library/PrivateFrameworks/IDEBund leInjection.framework/IDEBundleInjection"
Secondly, as of Xcode 6, the supported way of doing what you want is by using simctl:
SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection"
SIMCTL_CHILD_XCInjectBundleInto="Target.app/Target"
SIMCTL_CHILD_XCInjectBundle="UnitTests.xctest"
xcrun simctl launch [device udid or "booted"] com.mycompany.myapp -XCTest All "UnitTests.xctest"
Upvotes: 1