上面的debug,会在info/warn/error标识后面加一个[debug],是不是很丑,我是觉得很丑,我们将其改变一下改成[TesterHome],还是刚才的代码:
info: Starting App
warn: [TesterHome] Attempting to kill all 'uiautomator' processes
warn: [TesterHome] Getting all processes with 'uiautomator'
warn: [TesterHome] executing cmd: /Users/wuxian/Documents/tools/sdk/platform-tools/adb -s emulator-5554 shell "ps 'uiautomator'"
warn: [TesterHome] No matching processes found
warn: [TesterHome] Running bootstrap
warn: [TesterHome] spawning: /Users/wuxian/Documents/tools/sdk/platform-tools/adb -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.example.android.apis -e disableAndroidWatchers false
warn: [TesterHome] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
warn: [TesterHome] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
warn: [TesterHome] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
warn: [TesterHome] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
warn: [TesterHome] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
warn: [TesterHome] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class="io".appium.android.bootstrap.Bootstrap
warn: [TesterHome] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
warn: [TesterHome] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
warn: [TesterHome] [BOOTSTRAP] [debug] Socket opened on port 4724
warn: [TesterHome] [BOOTSTRAP] [debug] Appium Socket Server Ready
ok了。
没关系,写成中文,在devices/android/uiautomator.js文件中,找到190和203行左右的语句,将上面两个标识符修改为中文:
修改前:
修改后:
输出为:
info: Starting App
warn: [TesterHome] Attempting to kill all 'uiautomator' processes
warn: [TesterHome] Getting all processes with 'uiautomator'
warn: [TesterHome] executing cmd: /Users/wuxian/Documents/tools/sdk/platform-tools/adb -s emulator-5554 shell "ps 'uiautomator'"
warn: [TesterHome] No matching processes found
warn: [TesterHome] Running bootstrap
warn: [TesterHome] spawning: /Users/wuxian/Documents/tools/sdk/platform-tools/adb -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.example.android.apis -e disableAndroidWatchers false
warn: [TesterHome] [脚本输出] INSTRUMENTATION_STATUS: numtests=1
warn: [TesterHome] [脚本输出] INSTRUMENTATION_STATUS: stream=
warn: [TesterHome] [脚本输出] io.appium.android.bootstrap.Bootstrap:
warn: [TesterHome] [脚本输出] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
warn: [TesterHome] [脚本输出] INSTRUMENTATION_STATUS: test=testRunServer
warn: [TesterHome] [脚本输出] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
warn: [TesterHome] [脚本输出] INSTRUMENTATION_STATUS: current=1
warn: [TesterHome] [脚本输出] INSTRUMENTATION_STATUS_CODE: 1
warn: [TesterHome] [设备socket服务器输出] [debug] Socket opened on port 4724
warn: [TesterHome] [设备socket服务器输出] [debug] Appium Socket Server Ready