0

如何使用 Appium 从 jenkins url 安装 *.ipa ?

  @Before
  DesiredCapabilities capabilities = new DesiredCapabilities();
  capabilities.setCapability("deviceName", "Tester's mini Retina");
  capabilities.setCapability("platformName", "iOS");
  capabilities.setCapability("platformVersion", "9.2");
  capabilities.setCapability("udid", "3d54a856d44eda56ea19bb7e43c155");
  **capabilities.setCapability("app", "http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa");**
  driver = new IOSDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

错误:

Failed to start an Appium session, err was: Error: Bad app: 
http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa. 
App paths need to be absolute, or relative to the appium server install dir, 
or a URL to compressed file, or a special app name. cause: Error testing zip 
archive, are you sure this is a zip file? Error: Command failed: /bin/sh -c 
unzip -tq /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/116129-4973-z1mwjw/appium-app.zip`
4

2 回答 2

0

info: [debug] Using downloadable app from desired caps: http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa info: [debug] http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa downloaded to /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip info: [debug] Unzipping /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip info: [debug] Testing zip archive: /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip error: Test zip archive threw error Error: Command failed: /bin/sh -c unzip -tq /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip

info: [debug] Got configuration error, not starting session info: [debug] Cleaning up appium session error: Stderr: [/var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip or /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip.zip, and cannot find /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip.ZIP, period. error: Stdout: error: Failed to start an Appium session, err was: Error: Bad app: http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: Error testing zip archive, are you sure this is a zip file? Error: Command failed: /bin/sh -c unzip -tq /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip

info: [debug] Error: Bad app: http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: Error testing zip archive, are you sure this is a zip file? Error: Command failed: /bin/sh -c unzip -tq /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip

at [object Object].<anonymous> (/Users/aap/Temp/Appium/appium/lib/devices/ios/ios.js:188:13)
at [object Object].<anonymous> (/Users/aap/Temp/Appium/appium/lib/devices/device.js:134:11)
at [object Object].<anonymous> (/Users/aap/Temp/Appium/appium/lib/devices/device.js:169:7)
at /Users/aap/Temp/Appium/appium/lib/helpers.js:151:11
at /Users/aap/Temp/Appium/appium/lib/helpers.js:81:7
at /Users/aap/Temp/Appium/appium/lib/helpers.js:116:9
at ChildProcess.exithandler (child_process.js:220:5)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)

info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Bad app: http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: Error testing zip archive, are you sure this is a zip file? ``Error: Command failed: /bin/sh -c unzip -tq /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip\n)","origValue":"Bad app: http://10.65.5.167:8080/job/Lime%20iPad/ws/build/artifacts/LimeDemo-2.ipa. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: Error testing zip archive, are you sure this is a zip file? Error: Command failed: /bin/sh -c unzip -tq /var/folders/sv/fwvlgylj26z757f6hvjgvj3w0000gn/T/11621-4451-3ob9sk/appium-app.zip\n"},"sessionId":null}

info: <-- POST /wd/hub/session 500 111.717 ms - 936

于 2016-03-01T08:11:16.233 回答
0

您的应用程序是否使用开发者资料或分发资料签名?和 Appium 日志在这里更有助于找出问题。

于 2016-02-29T18:59:15.687 回答