![]() ![]() Download from the Mac App Store is incredibly slow and sometimes not even available for days after release (like 11.2.1). You cannot use the Mac App Store to install multiple version of Xcode at the same time if you need them, like when testing with a Xcode beta for an upcoming iOS release. Installing Xcode from the Mac App Store might seem like a convenient way to do so but it is too slow and inflexible. Forget Mac App Store, use Apple Developer Portal There are multiple ways to do this so do not waste your time and use the fastest way possible. Listing 21 Tests everything but iOSAppUITests specified in iOSApp_iphonesimulator.xctestrun using the iOS Simulator identified by 3D95DF14-E8B7-4A05-B65B-78F381B74B22.As an iOS developer you need to periodically update your Xcode, on your own machine and on your CI/CD server if you automate your development workflow. $ xcodebuild test-without-building -xctestrun iOSApp_iphonesimulator.xctestrun -destination 'platform=iOS Simulator,id=6DC4A7BA-EA7F-40D6-A327-A0A9DF82F7F6' _TESTROOT_/Debug-iphonesimulator/iOSApp.app Listing 15 Tests the iOS scheme on an iPad Pro (12.9 inch) with iOS 10.2 in the Simulator. The name and id keys are intergeably used with platform, which is a required key as shown in Listing 15 and Listing 16. The version of iOS or tvOS to simulate such as 9.0 or the string latest to indicate the most recent version of iOS supported by your version of Xcode. See Locate a device identifier for more information about getting your device identifier. The identifier of your device to be used for your unit tests. The name of your device as displayed in the Devices Organizer in Xcode. The full name of the simulator (iOS simulator for iOS apps and tvOS Simulator for tvOS apps) to be used for your unit tests and as displayed in the run destination of your Xcode project. The supported destination for your unit tests. Table 3 Supported keys for iOS Simulator and tvOS Simulator apps. Listing 13 Do not test iOSAppUITests on an iPhone. Test Suite 'iOSAppUITests.xctest' started at. Test Suite 'iOSAppTests.xctest' started at. ![]() = BUILD TARGET iOSAppUITests OF PROJECT iOSApp WITH CONFIGURATION Debug = = BUILD TARGET iOSAppTests OF PROJECT iOSApp WITH CONFIGURATION Debug = = BUILD TARGET iOSApp OF PROJECT iOSApp WITH CONFIGURATION Debug = $ xcodebuild test -workspace MyApplication.xcworkspace -scheme iOSApp -destination 'platform=iOS,name=iPhone' They take an argument, which specifies the test to be executed or excluded. The -only-testing and -skip-testing options, which are optional, allow you to run only a specific test and to skip a test, respectively. It consists of a set of comma-separated key=value pairs, which are dependent upon the the device, simulator, or Mac being used. It takes an argument, which describes the device, simulator, or Mac to use as a destination. The -destination option allows you to specify a destination for your unit tests. It is required when there are multiple Xcode projects in the same directory and optional, otherwise. Use this option when your scheme is contained in an Xcode project. The -project option allows you to specify the name of your Xcode project. Use this option when your scheme is contained in an Xcode workspace. The -workspace option allows you to specify the name of your workspace. See How do I implement the Build For Testing and Test Without Building features from the command line? for more information about build-for-testing and test-without-building actions. The test action requires specifying a scheme and a destination. Xcodebuild test-without-building -xctestrun. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |