mac环境下,连接两台真机,多进程执行case时,第一台设备先启动app执行case过程中,第二台设备启动了app,前一台设备日志报错,case停止执行,第二台设备正常执行完case。
端口和bp端口都有设置:
appium -p 5000 -bp 5001
appium -p 5005 -bp 5006

2018-04-12 20:37:44:763 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8206/wd/hub/session/d697a17b-6c42-49ee-9f8b-99a7edca8546/element] with body: {"strategy":"id","selector":"cn.com.open.mooc:id/account_edit","context":"","multiple":false}
2018-04-12 20:37:44:773 - [MJSONWP] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: read ECONNRESET
at JWProxy.proxy$ (/Users/jk/.nvm/versions/node/v8.9.3/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:152:13)
at tryCatch (/Users/jk/.nvm/versions/node/v8.9.3/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/jk/.nvm/versions/node/v8.9.3/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/jk/.nvm/versions/node/v8.9.3/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/jk/.nvm/versions/node/v8.9.3/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
2018-04-12 20:37:44:775 - [HTTP] <-- POST /wd/hub/session/12a5ecd3-5d08-498b-92f4-2e8b2f65bd09/element 500 14 ms - 251
E
======================================================================
ERROR: test_01 (__main__.CaseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_case.py", line 32, in test_01
message = self.login_business.login_user_error()
File "/Users/jk/Desktop/AppiumPython/business/login_business.py", line 16, in login_user_error
self.login_handle.send_username('1526704911')
File "/Users/jk/Desktop/AppiumPython/handle/login_handle.py", line 27, in send_username
self.login_page.get_username_element().clear()
File "/Users/jk/Desktop/AppiumPython/page/login_page.py", line 19, in get_username_element
return self.location.find_element('username')
File "/Users/jk/Desktop/AppiumPython/util/get_location_info.py", line 18, in find_element
return self.driver.find_element_by_id(by_location)
File "/usr/local/var/pyenv/versions/3.6.3/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 341, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "/usr/local/var/pyenv/versions/3.6.3/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 855, in find_element
'value': value})['value']
File "/usr/local/var/pyenv/versions/3.6.3/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
self.error_handler.check_response(response)
File "/usr/local/var/pyenv/versions/3.6.3/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
raise wde
File "/usr/local/var/pyenv/versions/3.6.3/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 24, in check_response
super(MobileErrorHandler, self).check_response(response)
File "/usr/local/var/pyenv/versions/3.6.3/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET


↙↙↙阅读原文可查看相关链接,并与作者交流