还未发布过话题
  • SwiftMonkey :iOS 上的 monkey at 2017年06月20日

    请问一下,这个 monkey 支持崩溃之后继续跑的吗?现在好像是遇到 crash 就停掉了

  • 作者好,我在跑这个测试的时候,遇到了一个调不起 app 的问题,而且对 app 的 bundle ID 有问题,明明已经是正确的 bundle ID 了,但是说不是,请看日志

    The command executed successfully.
    ---EVENT 执行了:45 次---
    sending Event : Submit->(211,565)
    ==当前启动的 APP bundleid 是<正确的 app bundle ID>,非测试 APP,重新呼起测试 APP====
    ==当前启动的 APP bundleid 是<正确的 app bundle ID>,非测试 APP,重新呼起测试 APP====
    ==当前启动的 APP bundleid 是<正确的 app bundle ID>,非测试 APP,重新呼起测试 APP====
    ==当前启动的 APP bundleid 是<(null)>,非测试 APP,重新呼起测试 APP====
    200
    Response content:{"sessionId":"81255d3a-aff4-4de1-a0ae-38034883a61b","status":0,"value":null}
    The command executed successfully.
    ---EVENT 执行了:46 次---
    sending Event : Content->(283,266)
    ==当前启动的 APP bundleid 是<正确的 bundle ID>,非测试 APP,重新呼起测试 APP====
    200
    Response content:{"sessionId":"81255d3a-aff4-4de1-a0ae-38034883a61b","status":10,"value":{"message":"An element command failed because the referenced element is no longer attached to the DOM."}}
    An element command failed because the referenced element is no longer attached to the DOM.

  • $ macaca doctor


    • version 1.2.2 is outdate *
    • run: npm i -g macaca-cli@2.0.4 * ************************************

    More information: https://macacajs.github.io/changelog.html

    macaca-doctor version: 1.0.28

    Node.js checklist:

    node env: /usr/local/bin/node
    node version: v7.10.0

    iOS checklist:

    Xcode is installed at: /Applications/Xcode.app/Contents/Developer
    Xcode Command Line Tools is ready, version: 2347.
    iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy
    ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

    Android checklist:

    JAVA version is 1.8.0_131
    JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
    ANDROID_HOME is not set

    Installed driver list:

    android: 2.0.22
    ios: 2.0.15

    现在用的版本都跟你的一样,macacalient 也是用 2.0.1 的,然后还真的是同样的错误,是不是我用的最新的 wda 导致的呢?

  • 作者你好,我刚才试了下 Macaca1.2.2 版本,然后 iOSmonkey 依赖 macacaclient1.0.48.jar,还是出一样的错误呢,怎么破?

  • 应该是的,那这个测试方案,支持到哪个版本?我换旧版本试试。

  • 大神,请教一下,我这边服务可以启动成功,在运行之后,也收到了请求,但是后面还是出错了,搞不懂啥原因,麻烦帮看一下
    服务端的日志:

    index.js:18:12 [master] pid:14196 webdriver server start with config:
    { port: 3456,
    verbose: true,
    always: true,
    ip: 'xxx',
    host: 'xxx',
    loaded_time: '2017-06-14 14:41:15' }
    middlewares.js:17:10 [master] pid:14196 base middlewares attached
    router.js:127:10 [master] pid:14196 router set
    webdriver sdk launched
    responseHandler.js:11:12 [master] pid:14196 Recieve HTTP Request from Client[2017-06-14 14:41:24]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"proxyPort":8900,"reuse":3,"bundleId":"cn.xxx","platformName":"ios","udid":“xxx","autoAcceptAlerts":true},"port":3456,"host":"127.0.0.1"}
    session.js:47:10 [master] pid:14196 Creating session, sessionId: 6a54886d-4ac3-43d1-bb1b-0ae8d6ed6107.
    ios-deploy
    macaca-ios.js:240:12 [master] pid:14196 App "xxx" is already installed.
    xctest-client.js:52:14 [master] pid:14196 project path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
    macaca-ios.js:158:10 [master] pid:14196 {
    "bundleId": "xxx",
    "platformName": "ios"
    }
    macaca-ios.js:160:10 [master] pid:14196 Trying to start xctestwd server...
    BundleId XCTestWD.XCTestWD does not exist.
    xctestwd start with port: 8900
    xctest-client.js:224:14 [master] pid:14196 xcode version: 8.3.2
    XCTestWD version: 1.0.33
    xctest-client.js:172:14 [master] pid:14196 xcodebuild: error: Unable to find a destination matching the provided destination specifier:
    { id:xxx }

    Unsupported device specifier option.
    The device “My Mac” does not support the following options: id
    Please supply only supported device specifier options.

    Available destinations for the "XCTestWDUITests" scheme:
    { platform:iOS, id:xxx, name:“hdcs” 的 iPhone }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPad Air }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPad Air 2 }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPad Pro (9.7 inch) }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPad Pro (12.9 inch) }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone 5 }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone 5s }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone 6 }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone 6 Plus }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone 6s }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone 6s Plus }
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone 7 }
    { platform:iOS Simulator, id:xx, OS:10.3, name:iPhone 7 Plus }x
    { platform:iOS Simulator, id:xxx, OS:10.3, name:iPhone SE }

    Ineligible destinations for the "XCTestWDUITests" scheme:
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }

    xctest-client.js:173:14 [master] pid:14196 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctest-client.js:255:14 [master] pid:14196 killing deviceLogProc pid: 14205
    xctest-client.js:260:14 [master] pid:14196 killing runnerProc pid: 14208
    xctest-client.js:266:14 [master] pid:14196 killing iproxyProc pid: 14207
    xctest-client.js:183:14 [master] pid:14196 xctest client exit with code: 70, signal: null
    xctest-client.js:145:16 [master] pid:14196 devicelog exit with code: null, signal: SIGKILL
    xctest-client.js:247:14 [master] pid:14196 Fail to start xctest: undefined
    responseHandler.js:54:12 [master] pid:14196 Send Error Respone to Client: undefined

    InternalServerError: Internal Server Error
    at Object.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/koa/lib/context.js:91:23)
    at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:57:17)
    at module.exports.throw ()
    at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
    at process._tickCallback (internal/process/next_tick.js:109:7)

    xctest-client.js:211:14 [master] pid:14196 iproxy exit with code: null, signal: SIGKILL

    执行 monkey 的日志:
    2017-06-14 14:42:27 Response:Internal Server Error


    请在命令行输入 macaca server --verbose 启动服务


    请确认参数配置,需要帮助请输入 java -jar iosMonkey.jar -h
    ERROR 信息 java.lang.NullPointerException
    =======启动 app 守护进程=======

    日志上涉及隐私的信息我手动改掉啦,真心求助大神帮忙定位下到底什么原因,万分感谢!