2016-02-29 70 views
0

我怎樣才能安裝* .ipa從jenkins url與Appium?如何使用Appium從jenkins URL安裝應用程序?

@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` 
+0

我懷疑'app'路那裏,你能不能調試通過'http://'事情的作品或不 – nullpointer

+0

http://screencast.com/t/jGJufdlC6F8 –

+0

我只能看到功能的計數,並沒有在截圖 – nullpointer

回答

0

是您的應用程序與開發人員的個人資料或分佈圖籤?並且Appium日誌在這裏找出問題會更有幫助。

+0

應用程序與開發人員資料簽署 –

+0

我想,錯誤是與路徑。它有'%20',它用'酸橙iPad'取代了空間。通過刪除它再試一次。 –

+0

問題不在於此,appium不能使用Jenkins URL。我正在下載.ipa詹金斯的手段並使用絕對應用程序路徑。 THS。 –

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