通过iOS Realdevice运行Appiumtest。实习生

时间:2017-08-03 15:04:32

标签: selenium appium intern

我目前正在尝试在iOS iPhone 7 PLUS上运行我的测试。 目前的情况是我可以从IntelliJ触发我的测试套件到selenium HUB(Windows)并将请求路由到Appium Server(Mac)。之后我的WebDriverAgentRunner启动并在我的iPhone unforunatley上打开Safari,它启动appium.io而不是运行我的测试套件。任何建议可能是什么原因?

下面你可以看到一般信息和我的AppiumServer日志文件。

我按照本指南设置我的WebDriverAgentRunner

https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

提前谢谢!!!

最好的问候

一般:

视窗:

Windows 7 运行Selenium Hub(java -jar selenium-server-standalone-3.4.0.jar -role hub)

实习生配置:

tunnel: “NullTunnel”,
tunnelOptions: {
host: “localhost:4444”
// port: “4444”
},

环境:[{     browserName:“Safari”,     platformName:[“iOS”],     platformVersion:[“10.3”],     平台:[“MAC”],     deviceName:[“iPhone7Plus”],     fixSessionCapabilities:“false” }],  proxyUrl:“http://XXXXX000:9000/”,

Mac Book iOS 10.12.5 Sierra: Appium版本1.6.5 运行Appium Server(appium --nodeconfig iPhoneNode.json -U XXXX)

iPhoneNode.json
{
“capabilities”: [
{
“browserName”: “Safari”,
“maxInstance”: 1,
“platformName”: “iOS”,
“platformVersion” : “10.3”,
“startIWDP”: true,
“udid”: “UID_Pseudo”,
“deviceName”: “iPhone7Plus”,
“platform”: “MAC”
}
],
“configuration”:
{
“cleanUpCycle”:2000,
“timeout”:30000,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”: “http://XXXXX:4723/wd/hub”,
“host”: “XXXXX”,
“port”: 4723,
“maxSession”: 1,
“register”: true,
“registerCycle”: 5000,
“hubPort”: 4444,
“hubHost”: “XXXXX000”,
“hub”: “XXXXX000:4444/grid/register”
}
}

我在Mac上安装以下软件包:

npm install -g appium
npm install -g ios-deploy
npm install appium doctor
brew install libtoolize
brew install automaker
brew install --HEAD libmobiledevice
xcode-select–install
brew install carthage

真实设备 iPhone 7 已安装的应用 SafariLauncher& WebDriverAgentRunner通过xCode

现在我尝试开始我的环境:

成功启动SeleniumGrid Hub 启动AppiumServer并成功连接到集线器

从IntelleJ getTimeout开始测试

现在iPhone正在打开Safari浏览器并导航到错误的wesbite(appium.io网站)

有关详细信息,请参阅AppiumServerLog:

[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“name”:“build/webapp/app/intern”,“idle-timeout”:60,“browserName”:“Safari”,“platformName”:“iOS”,“platformVersion”:“10.3”,“platform”:“MAC”,“deviceName”:“iPhone7Plus”},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1500650988235 (17:29:48 GMT+0200 (CEST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] name: ‘build/webapp/app/intern’
[Appium] idle-timeout: 60
[Appium] browserName: ‘Safari’
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘10.3’
[Appium] platform: ‘MAC’
[Appium] deviceName: ‘iPhone7Plus’
[Appium] udid: ‘UID_Pseudo’
[debug] [XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: name, idle-timeout, platform.
[BaseDriver] Session created with session id: fa9234e0-c195-4384-9b29-8d437a76d215
[debug] [XCUITest] Xcode version set to ‘8.3.3’ (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to ‘10.3’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1500650988431 (17:29:48 GMT+0200 (CEST))
[debug] [XCUITest] Available devices: UID_Pseudo
[debug] [XCUITest] Creating iDevice object with udid ‘UID_Pseudo’
[XCUITest] Determining device to run tests on: udid: ‘UID_Pseudo’, real device: true
[XCUITest] Safari test requested
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1500650988600 (17:29:48 GMT+0200 (CEST))
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1500650988600 (17:29:48 GMT+0200 (CEST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1500650988601 (17:29:48 GMT+0200 (CEST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1500650988754 (17:29:48 GMT+0200 (CEST))
[XCUITest] Setting up real device
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1500650988757 (17:29:48 GMT+0200 (CEST))
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=UID_Pseudo -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Log file for xcodebuild test: /Users/tnk/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/BA8AABB7-9F1B-4C6F-9D63-BE4B3250C46E/Session-WebDriverAgentRunner-2017-07-21_172956-nNAexN.log
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
ebug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651032579 (17:30:32 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651033651 (17:30:33 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651034660 (17:30:34 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651035670 (17:30:35 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651036680 (17:30:36 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651037690 (17:30:37 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651038751 (17:30:38 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
^C[Appium] Received SIGINT - shutting down
[debug] [XCUITest] iproxy exited with code ‘null’

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination'id ='test

测试正在运行,没有结束日志:

2017-07-24 09:00:26.860964+0200 XCTRunner[259:9227] Running tests…
2017-07-24 09:00:27.495866+0200 XCTRunner[259:9227] Continuing to run tests in the background with task ID 1
Test Suite ‘All tests’ started at 2017-07-24 09:00:28.149
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-07-24 09:00:28.150
Test Suite ‘UITestingUITests’ started at 2017-07-24 09:00:28.150
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-07-24 09:00:28.151
t = 0.00s Set Up
2017-07-24 09:00:28.162188+0200 XCTRunner[259:9347] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x17011f1d0> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application’s container requires user-preference-write or file-write-data sandbox access, switching to read-only
2017-07-24 09:00:28.162802+0200 XCTRunner[259:9227] Built at Jul 24 2017 07:59:00
2017-07-24 09:00:28.179892+0200 XCTRunner[259:9227] ServerURLHere->http://10.192.1.103:8100<-ServerURLHere

0 个答案:

没有答案