美文网首页Appium
Appium for iOS真机测试那些坑

Appium for iOS真机测试那些坑

作者: HeminWon | 来源:发表于2016-05-26 22:44 被阅读1330次

    开始真机测试Demo时提示错误

    info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
    
    error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
    

    解决方法:

    brew install --HEAD ideviceinstaller
    

    真机测试无限闪退

    info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Permission to debug cn.com.10jqka.IHexin was denied. The app must be signed with a development identity (e.g. iOS Developer).
    

    解决方法:线上应用一般为release版本,需要使用Debug版本
    详细参考:Can't launch my app in Instruments: At least one target failed to launch

    运行Python脚本报错

    SyntaxError: Non-ASCII character '\xe7' in file CodeMakerTest.py on line 24, but no encoding declared; see [http://python.org/dev/peps/pep-0263/](http://python.org/dev/peps/pep-0263/) for details 
    

    解决方法:在脚本文件(第一行)添加

    #coding:utf-8 
    

    appium真机测试无法启动app且报错

    error: Could not pre-launch appium: Error: Instruments crashed on startup
    

    解决方法:

    1. 设置-开发者-Enable UI Automation 需要为打开状态
    2. 若做了第一步依然报错,先试着使用将手机用Xcode进行Demo真机测试

    相关文章

      网友评论

      • 菜鸟nana:你好,请教一下
        我用appium+ios真机测试,跑测试脚本无法连接真机上的WebDriverAgent,下面是appium日志,麻烦帮我看一下吧,谢谢~
        [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@2.5.3@appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=4b75ddb6048501ceb2ec507d0166826590f216c2 -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.5.3@appium-xcuitest-driver/WebDriverAgent'
        [debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
        qzstechs-Mac-mini:~ huna$ [debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
        [debug] [XCUITest] Log file for xcodebuild test: /Users/huna/Library/Developer/Xcode/DerivedData/WebDriverAgent-hddwkzvcovvaclbcfwntdojakdcw/Logs/Test/6AAC4893-A6DA-429E-AFD9-7860C1265DC1/Session-WebDriverAgentRunner-2017-07-01_171132-iJxaOQ.log
        [debug] [XCUITest] WebDriverAgent running on ip '192.168.3.143'
        [debug] [XCUITest] WebDriverAgent successfully started after 8781ms
        [debug] [XCUITest] Sending createSession command to WDA
        [debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.qzstechx.WebDriverAgentLib","arguments":[],"environment":{},"shouldWaitForQuiescence":true}}
        [debug] [JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.qzstechx.WebDriverAgentLib application","sessionId":"C629828C-BE7A-4FA5-A408-69239B20CB8C","status":13}
        [debug] [XCUITest] Failed to create session. Retrying...

      本文标题:Appium for iOS真机测试那些坑

      本文链接:https://www.haomeiwen.com/subject/iqmxdttx.html