XCUITest Simulator architecture appears to be unsupported by the Appium

守給你的承諾、 提交于 2020-01-23 14:40:05

问题


I am trying to test my react native iOS app in saucelabs(appium). Saucelabs require a file zip of .app folder created after the xcode build.

I am using following steps(bitrise steps) to create the .app folder and the zip file. 1) Set Xcode Project Build Number 2) Xcode Archive & Export for iOS

Once the zip file is created it is uploadedin the saucelabs.

When I execute the tests in saucelabs, I get the following error from the appium server.

> 2018-06-20 08:58:53:668 - [XCUITest] *********************************
> 2018-06-20 08:58:53:669 - [XCUITest] Simulator architecture appears to be unsupported by the '/var/folders/s9/gmkmk07d6gq_pt_v72yyt8xc0000kr/T/tmpFzu0Wp/test.app' application. Make sure the correct deployment target has been selected for its compilation in Xcode.
> 2018-06-20 08:58:53:669 - [XCUITest] Don't be surprised if the application fails to launch.
> 2018-06-20 08:58:53:669 - [XCUITest] *********************************

When I downloaded the zip from the bitrise and test the zip in local appium server, I got the same error.

But when I create a new build from local MacBook system using Xcode, it works perfectly file in saucelabs as well as in local appium server.

What is the proper way to create a build for saucelabs iOS test using bitrise?


回答1:


use -sdk iphone-simulator to make a .app build. Then create a zip file and upload it to saucelabs




回答2:


For a more complete answer, you will have to zip the .app, e.g. zip -r IOS.zip IOS.app/ then copy the full path to that .zip and use it with this script below:

$name is the name of the zip and how you will reference it on Sauce Storage $path is the absolute path to the zip on your build machine / local computer.

#!/usr/bin/env bash

export SAUCE_USERNAME
export SAUCE_ACCESS_KEY

curl \
      --progress-bar \
      -u "${SAUCE_USERNAME}":"${SAUCE_ACCESS_KEY}" \
      -X POST \
      -H "Content-Type: application/octet-stream" \
      -H "Connection: Keep-Alive" \
      -H "Keep-Alive: timeout=180, max=4000" \
      "https://saucelabs.com/rest/v1/storage/""${SAUCE_USERNAME}""/$name?overwrite=true" --data-binary @"$path" ||
      exit


来源:https://stackoverflow.com/questions/50964374/xcuitest-simulator-architecture-appears-to-be-unsupported-by-the-appium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!