• @xdf
    不过重装的时候还是有问题!
    $ cnpm i macaca-android -g

    FAILURE: Build failed with an exception.

    • What went wrong:
      A problem occurred configuring project ':app'.

      You have not accepted the license agreements of the following SDK components:
      [Android SDK Build-Tools 25.0.2, Android SDK Platform 23].
      Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
      Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 2.342 secs
    (node:70253) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: build failed
    Checking the license for package Android SDK Build-Tools 25.0.2 in /Users/caolinming/tools/sdk/licenses
    Warning: License for package Android SDK Build-Tools 25.0.2 not accepted.
    Checking the license for package Android SDK Platform 23 in /Users/caolinming/tools/sdk/licenses
    Warning: License for package Android SDK Platform 23 not accepted.

    1. 下载:gradle 最新版本!
      https://gradle.org/releases

    2. 安装
      Linux & MacOS users
      Unzip the distribution zip file in the directory of your choosing, e.g.:
      $ mkdir /opt/gradle
      $ unzip -d /opt/gradle gradle-3.5-bin.zip
      $ sudo chmod 775 /opt/gradle/
      $ ls /opt/gradle/gradle-3.5
      LICENSE NOTICE bin getting-started.html init.d lib media

    3.Step 3. Configure your system environment
    Linux & MacOS users
    Configure your PATH environment variable to include the bin directory of the unzipped distribution, e.g.:
    $ export PATH=$PATH:/opt/gradle/gradle-3.5/bin

    再重装 cnpm i macaca-android -g

  • 我也是碰到了这个问题,应该是在 升级 macaca-android@2.0.0 之后出现的! 这个好处理! 找到报错的代码中 uuid 将后面的 括号去掉即可!
    不过这个问题解决后,估计又会报:
    cannot stat '/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.1.0.2@uiautomatorwd/app/build/outputs/apk/app-debug.apk': No such file or directory
    应该是下面的原因: Macaca doctor 中提示!
    Command Line Tools: gradle is uninstalled

  • 最终的写法 仍然是不稳定的,

    关键是如下错误,没能解决!

    (node:36424) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: socket hang up

  • 通过写这个方法 ,对 Promise 有些理解了!

  • UIRecorder v2.4.0 正式发布 at 2017年03月31日

    @yaniswang 你好,请问 录制功能 能 加一个 reuse 参数吗?我不希望每次录制都要重新安装包! 感谢!

  • 补充:
    在 node 命令行中:是可以获取到 java_home 变量的
    node

    process.env.JAVA_HOME
    '/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home'

  • 你好! 我这边 MAC 环境 , 已经配置了 JAVA_HOME;
    .bash_profile
    export JAVA_HOME=$(/usr/libexec/java_home)

    但安装 macaca-android 报 :Error: $JAVA_HOME is not set

    具体如下:
    sudo cnpm i macaca-android -g
    Error: $JAVA_HOME is not set
    at checkJavaHome.then.catch.then.then.catch.then.std (/usr/local/lib/node_modules/.macaca-android_npminstall/node_modules/.1.0.4@java-home/lib/java-home.js:89:25)
    at process._tickCallback (internal/process/next_tick.js:103:7)
    /usr/local/lib/node_modules/.macaca-android_npminstall/node_modules/.0.1.16@unlock-apk/script/build.js:28
    throw e;
    ^

    Error: $JAVA_HOME is not set
    at checkJavaHome.then.catch.then.then.catch.then.std (/usr/local/lib/node_modules/.macaca-android_npminstall/node_modules/.1.0.4@java-home/lib/java-home.js:89:25)
    at process._tickCallback (internal/process/next_tick.js:103:7)
    Error: post install error, please remove node_modules before retry!
    Run "sh -c node ./script/build.js" error, exit code 1
    at ChildProcess.proc.on.code (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/node_modules/runscript/index.js:67:21)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    npminstall version: 2.12.0
    npminstall args: /usr/local/bin/node /usr/local/lib/node_modules/cnpm/node_modules/.bin/npminstall --china --userconfig=/Users/caolinming/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org macaca-android -g

  • 感谢! 学习中!

  • cp settings.xml ~/.m2/settings.xml
    后 mvn -s settings.xml clean install -DskipTests

    运行 mvn test 没有报错 了!

  • @junhe 你好! 用新的工程 操作 还是报错!
    $ mvn test
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building autoui 0.0.2
    [INFO] ------------------------------------------------------------------------
    [WARNING] The POM for macaca.java:biz:jar:0.0.1 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.345 s
    [INFO] Finished at: 2017-02-16T11:28:37+08:00
    [INFO] Final Memory: 7M/155M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project autoui: Could not resolve dependencies for project com.javademo:autoui:jar:0.0.2: Failure to find macaca.java:biz:jar:0.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

  • OK 谢谢

  • 你好!
    mac 环境
    mvn -s settings.xml clean install -DskipTests 编译成功了!

    mvn -e test 时报错! 该怎么解决?

    [ERROR] Failed to execute goal on project autoui: Could not resolve dependencies for project com.javademo:autoui:jar:0.0.2: Failure to find macaca.java:biz:jar:0.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project autoui: Could not resolve dependencies for project com.javademo:autoui:jar:0.0.2: Failure to find macaca.java:biz:jar:0.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)

  • 最简单的就是验证,订单表中的订单金额跟支付表中的支付金额一致;

  • 连续两年的总结都完整的看过了!文笔厉害! 我们这边 写了 几百条 sql 按照不同的周期,对线上数据进行各种不同维度之间的数据校验和异常数据的捕获,应该也算是线上监控的一种!

  • codingfishman commented 2 days ago
    Hi @mengde0077
    你是不是说 recorder.js 中的 normalizeInfo?
    resBody 放置的是 Buffer 对象,因此直接打印出来的话就不是期待中的字符串。
    resbody 不只有字符串的返回,也包括图片、音频等其他的返回,因此直接显示字符串是不合适的,需要进行区分。 你可以参考 recorder.js 中的 getDecodeBody, 来看一下如何处理。

    另外,可否也帮我们描述一下你将日志输入到 file 的场景是什么? 方便我们后续完善:)

    谢谢

  • 第一次发,在解决这个问题是还是碰到不少问题,在 github 上提问受到提醒才 弄出来的;
    感谢 codingfishman

  • 我们公司都是 使用 sublime 编写用例,打开、编写和执行 都比较快!

  • —解决方式,配置问题,
    weigedeMacBook-Pro:AutoTraveler_jar weige$ java -jar ~/Desktop/gitdir/AutoTraveler/out/artifacts/AutoTraveler_jar/AutoTraveler.jar android /Users/weige/Desktop/gitdir/AutoTraveler/config/android.xml
    Error: Unable to access jarfile /Users/weige/Desktop/gitdir/AutoTraveler/out/artifacts/AutoTraveler_jar/AutoTraveler.jar

    I am using Intellij IDEA 12.0.4 on MAC OS X 10.8.3 to create a jar file. I go to
    File -> Project Structure -> Artifacts -> + -> Jar
    -> From modules with dependencies
    -> Selected Main Class after browsing
    -> selected extract to the target jar
    -> Directory for META-INF :
    把默认的地址: "/Users/weige/Desktop/gitdir/AutoTraveler/src”
    改为"/Users/weige/Desktop/gitdir/AutoTraveler/resources"
    没有目录的,需要新建目录
    -> OK -> Apply -> OK -> Build -> Build Artifacts -> Build

  • 非常感谢,楼主开源的代码,虽然已经能够做一些改造,但如果作者已经有了这方面的设计,还是希望用原版的,呵呵!

  • 你好! 我这边 已经跑起来了! 不过我希望能把每个页面的资源拉出来,检查 里面是否包含有一些特定的值,如:卡壳、系统错误等等异常信息,用来捕获遍历过程中发现业务异常,不知道该怎么做? 或者最新的版本中有考虑这些吗 ?

  • 问题已经解决!

  • 请问 上一个回复中的 这个错误怎么解决?

  • java -jar AutoTraveler.jar android /Users/weige/Desktop/gitdir/AutoTraveler/config/android.xml
    Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/Capabilities
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at pers.traveler.robot.RobotFactory.build(RobotFactory.java:13)
    at pers.traveler.test.Main.main(Main.java:20)
    Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.Capabilities
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 4 more

  • 期待 更新 开源代码!参考学习!