Preparing a Mac to Test Mobile Applications on iOS

Note: To test native mobile applications or hybrid applications with Silk Test Workbench, you require a native mobile license. For additional information, see Licensing Information.

To test mobile applications on iOS, you require a Mac to which you can connect the iOS device, or on which the iOS Simulator is running. This Mac requires Xcode to be installed. For additional information on the prerequisites for testing mobile applications on iOS, see Prerequisites for Testing Mobile Applications on iOS.

To execute iOS tests on a physical iOS device, follow the instructions in the Silk Test Configuration Assistant to configure the WebDriverAgentRunner Xcode project. To open the Configuration Assistant, click on the Silk Test icon in the status menus and select Configuration Assistant.

If for any reason you want to manually build the WebDriverAgentRunner Xcode project, perform the following actions:

  1. Start Xcode on the Mac.
  2. Select Xcode > Preferences.

  3. In the Preferences window, select your account.
    1. Select the Accounts tab.
    2. Choose your Apple ID.
    3. Choose your Team.
    4. Click View Details.

  4. Access the Apple Member Center and retrieve your development team.
  5. In a terminal, navigate to ~/.silk/silktest/conf/.
  6. Rename the xcconfig file template silktest.xcconfig.sample to silktest.xcconfig.
  7. Add your development team to the silktest.xcconfig file.
    DEVELOPMENT_TEAM = <your development team>
  8. Execute the following commands in a terminal on the Mac to verify that you have prepared the WebDriverAgentRunner project correctly:
    1. Determine the unique device id (udid) of your physical iOS device:
      idevice_id -l
    2. Navigate to the WebDriverAgentRunner project:
      cd /Application/Silk/Mobile/common/Appium/node_modules/appium-xcuitest-driver/WebDriverAgent
    3. Test that the WebDriverAgent can be built:
      xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner –xcconfig ~/.silk/silktest/conf/silktest.xcconfig -destination 'id=<udid>' test
      Replace the <udid> with the unique device id that you have determined previously.
      Tip: If the xcodebuild command fails, follow the instructions in the error message. Additionally, open the Preferences window of the WebDriverAgentRunner project and ensure that the Automatically manage signing check box in the General tab is not checked.
  9. Optional: In the file, you can specify the port for the Silk Test Information Service or capabilities which are used during all test runs on the Mac. For additional information, see Editing the Properties of the Silk Test Information Service.