• instruments[2623:53437] *** -[__NSCFConstantString stringByAppendingPathExtension:]: cannot append extension 'tracetemplate' to path ''
    Instruments Usage Error: The specified template '' does not exist.
    instruments, version 8.1 (61529)
    usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable
    这是什么原因有遇到过的吗?

  • ava.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:459)
    at java.util.Properties.setProperty(Properties.java:166)
    at org.testng.reporters.JUnitXMLReporter.generateReport(JUnitXMLReporter.java:163)
    at org.testng.reporters.JUnitXMLReporter.onFinish(JUnitXMLReporter.java:118)
    at org.testng.TestRunner.fireEvent(TestRunner.java:1246)
    at org.testng.TestRunner.afterRun(TestRunner.java:1039)
    at org.testng.TestRunner.run(TestRunner.java:621)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
    at org.testng.TestNG.run(TestNG.java:1031)

    请问这个是说报告的地址设置的不对吗

  • 我在 ide 里配置了环境变量问题终于解决了

  • System.out.println(System.getenv().get("ANDROID_HOME"));
    我打印了下是 null。
    明明是配置了的

  • 我用 gui 是好的

  • 用 java 命令启动
    Exception in thread "main" org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find adb Please set the ANDROID_HOME environment variable with the Android SDK root directory path. (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 323 milliseconds
    运行的时候会报这个错误
    我的 bash 如下:
    export MAVEN_HOME=/Users/user/apache-maven-3.3.9
    export M2=$MAVEN_HOME/bin
    export PATH=$M2:$PATH
    export ANDROID_HOME=/Users/user/Library/Android/sdk
    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
    export APPIUM_HOME=/Applications/Appium.app/Contents/Resources/node_modules/.bin
    export PATH=${PATH}:${APPIUM_HOME}:${JAVA_HOME}:/Users/user/Library/Android/sdk/platform-tools
    我的 environment.plist 配置如下:
    <?xml version="1.0" encoding="UTF-8"?>
    <! DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">


    Label
    my.startup
    ProgramArguments

    sh
    -c

    launchctl setenv APPIUM_HOME /Applications/Appium.app/Contents/Resources/node_modules/.bin
    launchctl setenv ANDROID_HOME /Users/user/Library/Android/sdk
    launchctl setenv PATH $PATH:/Users/user/Library/Android/sdk/platform-tools


    RunAtLoad



    ~

  • @adfghzhang 非常感谢我用了多线程之后命令是不会阻塞了

  • 不好意思回帖的时候 copy 错了

  • 我把进程杀掉 # lsof -i tcp:4723
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    node 740 user 11u IPv4 0xd766c650ff131c73 0t0 TCP localhost:4723 (LISTEN)
    lijinhaideMacBook-Pro:LaunchAgents root# kill 740
    之后才能打印出下面的信息
    Appium] Welcome to Appium v1.5.3
    [Appium] Non-default server args:
    [Appium] address: '127.0.0.1'
    [Appium] Appium REST http interface listener started on 127.0.0.1:4723

  • <?xml version="1.0" encoding="UTF-8"?>
    <! DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">


    Label
    my.startup
    ProgramArguments

    sh
    -c

    launchctl setenv APPIUM_HOME /Applications/Appium.app/Contents/Resources/node_modules/.bin
    lanchctl setenv ANDROID_HOME /Users/user/Library/Android/sdk
    lanchctl setenv IDEVICEINSTALLER_HOME /usr/local/bin


    RunAtLoad



    加上也是这样