IOS App自动化测试环境配置 - Selenium2.0+Appium

5 篇文章 0 订阅
5 篇文章 0 订阅

(注:项目是HP的,客户在美国,配置文档是给客户看的,所以用的E文,也懒得翻译了,见谅)
Test Environment
Mac and IOS environment
Mac mini: OS X 10.10.3
IOS devices: iPhone 5S 8.0

Software environment
JDK 1.8.25
XCode 6.3
Appium 1.3.7
HP ePrint IOS App 5.7.0.181

Apple developer accountrequirement
IOS Develop Permission. $99 per year.

Xcode Account Setup
Create a developer account onApple web site, and then login Xcode with the account.
Xcode -> Preferences -> Accounts -> Click ‘+’ toadd a new account -> Add the developer account.
这里写图片描述

Apple Developer Certificates
这里写图片描述
这里写图片描述

Download the certificates and save it into local disk. It’scertSigningRequest type file.

Create App ID.
Input any string in App ID Description failed, select “WildcardApp ID”, input “com.hp.*” in bund ID field, and then click Continue save it.
The App ID means a project name, so the created App IDshould matches the tested iOS app bundle ID, but we cannot create the explicitApp ID, such as ePrint “com.hp.com.HPePrintHome-n-Biz”, So we need create awildcard App ID, such as “com.hp.*”, it means the App ID works for all the iOSapp which bundle ID’s prefix is “com.hp.”.
这里写图片描述

iOS device Setup
Select device tab and click “+” button, create device Nameand input the UUID and save it.
Get UUID from Xcode, open Xcode -> Window -> Devices-> select the connected device via USB, the Identifier is the UUID.
这里写图片描述

Generate ProvisioningProfiles.
Click “+” button to open “Add iOS Provisioning Profile”page. Select “iOS App development”and click “Continue”.
这里写图片描述

Select the created App ID just now and click “Continue”.
这里写图片描述

Select the created certificates just now and click “Continue”.
这里写图片描述

Select the new registered iOS device and click “Continue”
这里写图片描述

Create a profile name and click “Generate” button.
这里写图片描述

Download the provisioning profile and save it into localdisk.
这里写图片描述

Re-sign IOS App
1) First extract HPePrint.app fromHPePrint.ipa
2) Generate “entitlements.plist”file and put it into the app folder.
The file contents should be, and open the file correct with Xcode.

<?xml version="1.0"encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC"-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plistversion="1.0">
<dict>
  <key>get-task-allow</key>
  <true/>
</dict>
</plist>

这里写图片描述

3) Use the below command to re-sign the app.
Open a terminal and go to the app folder, execute below command.

codesign -f -s "iPhone Developer: XXXX" ./HPePrint.app/ResourceRules.plist HPePrint.app --entitlements entitlements.plist

这里写图片描述
The parameter “iPhone Developer: XXXX” can be found inKeychain Access.
这里写图片描述

Appium and iOS Device Setup.
1) iOS setup
iOS device –> settings -> Developer -> Turn on “EnableUI Automation” option
这里写图片描述
2) Install provisioning profileand re-signed app into iOS device.
Open Xcode -> Window -> devices -> click settingbutton below and open “Show Provisioning Profiles”
这里写图片描述
Click “+” to add the provisioning profile into the iOSdevice.
这里写图片描述
Return device window and click “+” to select the re-signedapp and install it into device.
这里写图片描述
3) Appium setup
这里写图片描述
The parameter BundleID can be found in Xcode.
这里写图片描述

Launch Appium Inspector
Open Appium -> click Start -> click Appium Inspector
Environment was ready if the Appium inspector launchedsuccessfully in Mac and the App launched successfully in iOS device.
这里写图片描述


  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值