appium server日志分析
文章出处http://blog.csdn.net/yan1234abcd/article/details/60765295
每次运行测试,可以从Appium Server控制台看到有特别多的日志输出,这些日志其实很清楚的显示一个test从启动到case完成的活动过程
所以如果能够更好的理解这些日志的内容,会帮助我们更好的理解整个测试流程。
下面是一个例子,主要功能是在安卓模拟器上安装某个APP,并进行登录。
日志的具体内容如下所示:
> Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
> warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
> info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)
> info: Appium REST http interface listener started on 127.0.0.1:4723
> info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"23","automationName":"Appium"}
> info: Console LogLevel: debug
===== 启动REST http服务器,默认监听 本地4723端口(这里可通过ip配置appium server的地址)
用于接收客户端(Test Case+Selenium/Appium Driver)发过来的JSON格式的命令指示。
> info: --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"Appium","platformVersion":"4.2.2","app":"D:\\project\\AppiumFirstTest\\app\\Winky_default_1.2.16.apk","deviceName":"Android Emulator","platformName":"Android",
"appActivity":".ui.activity.MainActivity","appPackage":"com.weiboyi.winky"}}
> info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
> info: [debug] Using local app from desired caps: D:\project\AppiumFirstTest\app\Winky_default_1.2.16.apk
> info: [debug] Creating new appium session 3c687853-cbb9-4ad4-ac30-00fddbec10fe
> info: Starting android appium
> info: [debug] Getting Java version
> info: Java version is: 1.7.0_79
> info: [debug] Checking whether adb is present
> info: [debug] Using adb from D:\Program Files\Android\android-sdk\platform-tools\adb.exe
> info: [debug] Using fast reset? true
===== 根据客户端提供的capabilities指示建立一个Android Sesision用于跟客户端保持后续通信
> info: [debug] Preparing device for session
> info: [debug] Checking whether app is actually present
> info: Retrieving device
> info: [debug] Trying to find a connected android device
> info: [debug] Getting connected devices...
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" devices
> info: [debug] 1 device(s) connected
> info: Found device emulator-5554
> info: [debug] Setting device id to emulator-5554
> info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 wait-for-device
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "echo 'ready'"
===== 通过”adb devices“命令列出查询到的手机 emulator-5554
=====通过"adb -s emulator-5554 wait-for-device"和"adb -s emulator-5554 shell "echo 'ready'"检查安卓手机是否已经准备好
> info: [debug] Starting logcat capture
> info: [debug] Getting device API level
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "getprop ro.build.version.sdk"
> info: [debug] Device is at API Level 19
> info: Device API level is: 19
===== 通过adb执行相应的shell命令获得安卓机器的API Level
> info: [debug] Extracting strings for language: default
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "getprop persist.sys.language"
> info: [debug] Current device persist.sys.language: zh
> info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "D:\project\AppiumFirstTest\app\Winky_default_1.2.16.apk" "C:\Users\win7\AppData\Local\Temp\com.weiboyi.winky" zh
> info: [debug] Reading strings from converted strings.json
> info: [debug] Setting language to default
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 push "C:\\Users\\win7\\AppData\\Local\\Temp\\com.weiboyi.winky\\strings.json" /data/local/tmp
> info: [debug] Checking whether aapt is present
> info: [debug] Using aapt from D:\Program Files\Android\android-sdk\build-tools\23.0.2\aapt.exe
> info: [debug] Retrieving process from manifest.
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\build-tools\23.0.2\aapt.exe" dump xmltree D:\project\AppiumFirstTest\app\Winky_default_1.2.16.apk AndroidManifest.xml
> info: [debug] Set app process to: com.weiboyi.winky
> info: [debug] Not uninstalling app since server not started with --full-reset
> info: [debug] Checking app cert for D:\project\AppiumFirstTest\app\Winky_default_1.2.16.apk.
> info: [debug] executing cmd: java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" D:\project\AppiumFirstTest\app\Winky_default_1.2.16.apk
> info: [debug] App already signed.
> info: [debug] Zip-aligning D:\project\AppiumFirstTest\app\Winky_default_1.2.16.apk
> info: [debug] Checking whether zipalign is present
> info: [debug] Using zipalign from D:\Program Files\Android\android-sdk\build-tools\23.0.2\zipalign.exe
> info: [debug] Zip-aligning apk.
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\build-tools\23.0.2\zipalign.exe" -f 4 D:\project\AppiumFirstTest\app\Winky_default_1.2.16.apk C:\Users\win7\AppData\Local\Temp\115113-3716-wbhh3m\appium.tmp
> info: [debug] MD5 for app is 37dbd1e6b45b84b54581706c71725f6c
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell " ls /data/local/tmp/37dbd1e6b45b84b54581706c71725f6c.apk"
> info: [debug] Getting install status for com.weiboyi.winky
=====使用工具aapt,通过命令“aapt dump badging Winky_default_1.2.16.apk”来获得dobby的packageName和launchable activityName
> info: [debug] Getting device API level
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "getprop ro.build.version.sdk"
> info: [debug] Device is at API Level 19
===== 通过adb执行相应的shell命令获得安卓机器的API Level
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "pm list packages -3 com.weiboyi.winky"
> info: [debug] App is installed
> info: Installing App
===== 通过adb执行相应的shell命令检查目标应用是否已经存在 pm list packages -3 com.weiboyi.winky
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "mkdir -p /data/local/tmp/"
> info: [debug] Removing any old apks
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "ls /data/local/tmp/*.apk"
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell rm "/data/local/tmp/4634d715dc9bf150d018dc51ade40e88.apk"
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 push "D:\\project\\AppiumFirstTest\\app\\Winky_default_1.2.16.apk" /data/local/tmp/37dbd1e6b45b84b54581706c71725f6c.apk
> info: [debug] Uninstalling com.weiboyi.winky
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "am force-stop com.weiboyi.winky"
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 uninstall com.weiboyi.winky
> info: [debug] App was uninstalled
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "pm install -r /data/local/tmp/37dbd1e6b45b84b54581706c71725f6c.apk"
===== 通过adb执行相应的shell命令,在安卓目标机器上清理目标应用运行环境:该卸载就卸载,该停止就停止,该清空数据就清空数据
> info: [debug] Forwarding system:4727 to device:4724
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 forward tcp:4724
===== 通过adb执行相应的shell命令,建立Appium Server到目标机器上的端口转发
> info: [debug] Pushing appium bootstrap to device...
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 push "C:\\Program Files (x86)\\Appium\\node_modules\\appium\\build\\android_bootstrap\\AppiumBootstrap.jar" /data/local/tmp/
===== 通过adb执行相应的shell命令,把AppiumBootstrap.apk push到目标设备:这是目标机器上通过uiautomator工具(框架)运行的服务端,用于接受处理client端发送过来的命令
> info: [debug] Pushing settings apk to device...
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
> info: [debug] Pushing unlock helper app to device...
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
> info: Starting App
=====通过adb执行相应的shell命令, 把settings_apk-debug.apk和unlock_apk-debug.apk push到目标机器:emulator-5554
> info: [debug] Attempting to kill all 'uiautomator' processes
> info: [debug] Getting all processes with 'uiautomator'
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "ps 'uiautomator'"
===== 通过adb执行相应的shell命令确保uiautomator没有已经在跑
> info: [debug] No matching processes found
> info: [debug] Running bootstrap
> info: [debug] spawning: D:\Program Files\Android\android-sdk\platform-tools\adb.exe -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.weiboyi.winky -e disableAndroidWatchers false
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
> info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class="io".appium.android.bootstrap.Bootstrap
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
> info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
> info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
> info: [debug] [BOOTSTRAP] [debug] Loading json...
> info: [debug] Waking up device if it's not alive
> info: [debug] Pushing command to appium work queue: ["wake",{}]
> info: [debug] [BOOTSTRAP] [debug] json loading complete.
> info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
> info: [debug] [BOOTSTRAP] [debug] Client connected
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: wake
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "dumpsys window"
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Screen already unlocked, continuing.
> info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
> info: [debug] dataDir set to: /data
> info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"\/data","status":0}
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":false,"status":0}
> info: [debug] Getting device API level
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "getprop ro.build.version.sdk"
> info: [debug] Device is at API Level 19
===== 通过adb把目标机器上的Appium BootStrap跑起来:”uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Rootstrap”.
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.weiboyi.winky/.ui.activity.MainActivity"
> info: [debug] Waiting for pkg "com.weiboyi.winky" and activity ".ui.activity.MainActivity" to be focused
> info: [debug] Getting focused package and activity
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "dumpsys window windows"
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "getprop ro.build.version.release"
> info: [debug] Device is at release version 4.4.4
> info: [debug] Device launched! Ready for commands
> info: [debug] Setting command timeout to the default of 60 secs
===== 通过adb在目标机器上 Launch app
> info: [debug] Appium session started with sessionId 3c687853-cbb9-4ad4-ac30-00fddbec10fe
> info: <-- POST /wd/hub/session 303 75048.909 ms - 74
> info: --> GET /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe {}
> info: [debug] Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"4.4.4",
"webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,
"locationContextEnabled":false,"warnings":{},"desired":{"automationName":"Appium","platformVersion":"4.2.2",
"app":"D:\\project\\AppiumFirstTest\\app\\Winky_default_1.2.16.apk","deviceName":"Android Emulator","platformName":"Android",
"appActivity":".ui.activity.MainActivity","appPackage":"com.weiboyi.winky"},"automationName":"Appium",
"app":"D:\\project\\AppiumFirstTest\\app\\Winky_default_1.2.16.apk","deviceName":"emulator-5554","platformName":"Android",
"appActivity":".ui.activity.MainActivity","appPackage":"com.weiboyi.winky"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- GET /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe 200 2.212 ms - 804 {"status":0,"value":{"platform":"LINUX","browserName":"Android",
"platformVersion":"4.4.4","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,
"locationContextEnabled":false,"warnings":{},"desired":{"automationName":"Appium","platformVersion":"4.2.2",
"app":"D:\\project\\AppiumFirstTest\\app\\Winky_default_1.2.16.apk","deviceName":"Android Emulator","platformName":"Android","appActivity":
".ui.activity.MainActivity","appPackage":"com.weiboyi.winky"},"automationName":"Appium","app":"D:\\project\\AppiumFirstTest\\app\\Winky_default_1.2.16.apk",
"deviceName":"emulator-5554","platformName":"Android","appActivity":".ui.activity.MainActivity","appPackage":"com.weiboyi.winky"},
"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== 通知PC端目标应用已经在目标机器启动成功
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element {"using":"id","value":"username"}
> info: [debug] Waiting up to 0ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"username","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"username","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding username using ID with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.weiboyi.winky:id/username]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"1"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"1"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element 200 3347.068 ms - 87 {"status":0,"value":{"ELEMENT":"1"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== 定位”用户名“输入框:Bootstrap通过的UIAutomator的UISelector类根据resource-id获得输入框的ID并返回给客户端
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/1/clear {"id":"1"}
> info: [debug] Pushing command to appium work queue: ["element:clear",{"elementId:1"}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:clear","parameter",{"elementId:1"}}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: clear
> info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
> info: [debug] [BOOTSTRAP] [debug] Text remains after clearing, but it appears to be hint text.
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/1/clear 200 3864.563 ms - 76 {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== BootStrap执行”清空 用户名输入框”命令
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element {"using":"id","value":"username"}
> info: [debug] Waiting up to 0ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"username","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"username","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding username using ID with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.weiboyi.winky:id/username]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"2"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"2"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element 200 635.168 ms - 87 {"status":0,"value":{"ELEMENT":"2"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== 定位”用户名“输入框:Bootstrap通过的UIAutomator的UISelector类根据resource-id获得输入框的ID并返回给客户端
===== 可以发现“用户名输入框”在上次已经找过一次了,所以这里我们相当于是在同一个测试方法中对同一个控件查找两次。其实这是有点浪费
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/2/value {"id":"2","value":["cceshi"]}
> info: [debug] Pushing command to appium work queue: ["element:setText",{"elemetnId":"2","text":"cceshi","replace":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"2","text":"cceshi","replace":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: setText
> info: [debug] [BOOTSTRAP] [debug] Using element passed in.
> info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
> info: [debug] [BOOTSTRAP] [debug] Text remains after clearing, but it appears to be hint text.
> info: [debug] [BOOTSTRAP] [debug] Text not cleared. Assuming remainder is hint text.
> info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: cceshi
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/2/value 200 7632.310 ms - 76 {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== BootStrap执行”向 用户名输入框 填写cceshi”命令
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element {"using":"id","value":"password"}
> info: [debug] Waiting up to 0ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"password","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"password","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding password using ID with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.weiboyi.winky:id/password]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"3"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"3"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element 200 487.965 ms - 87 {"status":0,"value":{"ELEMENT":"3"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== 定位”密码“输入框:Bootstrap通过的UIAutomator的UISelector类根据resource-id获得输入框的ID并返回给客户端
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/3/clear {"id":"3"}
> info: [debug] Pushing command to appium work queue: ["element:clear",{"elementId":"3"}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:clear","params":{"elementId":"3"}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: clear
> info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/3/clear 200 3801.019 ms - 76 {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== BootStrap执行”清空 密码 输入框”命令
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element {"using":"id","value":"password"}
> info: [debug] Waiting up to 0ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"password","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"password","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding password using ID with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.weiboyi.winky:id/password]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"4"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"4"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element 200 290.380 ms - 87 {"status":0,"value":{"ELEMENT":"4"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== 定位”密码“输入框:Bootstrap通过的UIAutomator的UISelector类根据resource-id获得输入框的ID并返回给客户端
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/4/value {"id":"4","value":["weibo2013yic"]}
> info: [debug] Pushing command to appium work queue: ["element:setText",{"elementId":"4","text":"weibo2013yic","replace":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"4","text":"weibo2013yic","replace":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: setText
> info: [debug] [BOOTSTRAP] [debug] Using element passed in.
> info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
> info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: weibo2013yic
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/4/value 200 7854.103 ms - 76 {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== BootStrap执行”向 用户名输入框 填写weibo2013yic”命令
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element {"using":"id","value":"user_sign_in_button"}
> info: [debug] Waiting up to 0ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"user_sign_in_button","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"user_sign_in_button","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding user_sign_in_button using ID with the contextId: multiple: false
> info: [debug] [UIAUTOMATOR STDOUT] [APPIUM-UIAUTO] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.weiboyi
> info: [debug] [UIAUTOMATOR STDOUT].winky:id/user_sign_in_button][/APPIUM-UIAUTO]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"5"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"5"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element 200 660.639 ms - 87 {"status":0,"value":{"ELEMENT":"5"},"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
===== 定位”登录“按钮:Bootstrap通过的UIAutomator的UISelector类根据resource-id获得输入框的ID并返回给客户端
> info: --> POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/5/click {"id":"5"}
> info: [debug] Pushing command to appium work queue: ["element:click",{"elementId":"5"}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"5"}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: click
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- POST /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe/element/5/click 200 962.940 ms - 76 {"status":0,"value":true,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: --> DELETE /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe {}
> info: Shutting down appium session
> info: [debug] Pressing the HOME button
> info: [debug] executing cmd: "D:\Program Files\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "input keyevent 3"
===== BootStrap执行”点击登录按钮”命令
> info: [debug] Stopping logcat capture
> info: [debug] Logcat terminated with code null, signal SIGTERM
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
> info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"OK, shutting down","status":0}
===== 关闭logcat
> info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
> info: [debug] [BOOTSTRAP] [debug] Closed client connection
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class="io".appium.android.bootstrap.Bootstrap
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
> info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
> info: [debug] [UIAUTOMATOR STDOUT] Time: 54.578
> info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
> info: [debug] UiAutomator shut down normally
===== 关闭Uiautomator进程
> info: [debug] Cleaning up android objects
> info: [debug] Cleaning up appium session
> info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
> info: <-- DELETE /wd/hub/session/3c687853-cbb9-4ad4-ac30-00fddbec10fe 200 6850.914 ms - 76 {"status":0,"value":null,"sessionId":"3c687853-cbb9-4ad4-ac30-00fddbec10fe"}
appium server日志分析的更多相关文章
- Appium Server源码分析之作为Bootstrap客户端
Appium Server拥有两个主要的功能: 它是个http服务器,它专门接收从客户端通过基于http的REST协议发送过来的命令 他是bootstrap客户端:它接收到客户端的命令后,需要想办法把 ...
- Appium Server 源码分析之启动运行Express http服务器
通过上一个系列Appium Android Bootstrap源码分析我们了解到了appium在安卓目标机器上是如何通过bootstrap这个服务来接收appium从pc端发送过来的命令,并最终使用u ...
- 启动appium server时打印日志时间
在调试脚本的时候想看查找元素和执行命令花了多少时间,我们可以在启动appium server的时候加上启动参数,实现我们的需求. 1)输入:appium h,可以查看appium提供的启动参数有哪些. ...
- 手机自动化测试:Appium源码分析之跟踪代码分析八
手机自动化测试:Appium源码分析之跟踪代码分析八 poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜任自动化测试,性能测试,测试工具开发等工作为目标.如果对课程感兴趣,请大家 ...
- ELK+Kafka集群日志分析系统
ELK+Kafka集群分析系统部署 因为是自己本地写好的word文档复制进来的.格式有些出入还望体谅.如有错误请回复.谢谢! 一. 系统介绍 2 二. 版本说明 3 三. 服务部署 3 1) JDK部 ...
- MyCAT日志分析
MyCAT日志对于了解MyCAT的运行信息不可获取,譬如MyCAT是否采用读写分离,对于一个查询语句,MyCAT是怎样执行的,每个分片会分发到哪个节点上等等. 默认是info级别,通过log4j.xm ...
- ELK+redis搭建nginx日志分析平台
ELK+redis搭建nginx日志分析平台发表于 2015-08-19 | 分类于 Linux/Unix | ELK简介ELKStack即Elasticsearch + Logstas ...
- nginx日志分析利器GoAccess
面试的时候一定会被面到的问题是:给出web服务器的访问日志,请写一个脚本来统计访问前10的IP有哪些?访问前10的请求有哪些?当你领略过goaccess之后,你就明白,这些问题,除了考验你的脚本背诵记 ...
- 【转】ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台
[转自]https://my.oschina.net/itblog/blog/547250 摘要: 前段时间研究的Log4j+Kafka中,有人建议把Kafka收集到的日志存放于ES(ElasticS ...
随机推荐
- jQuery 实战读书笔记之第四章:使用特性、属性和数据
使用属性 /* 每个元素都有一或多个特性,,这些特性的用途是给出相应元素或其内容的附加信息.(出自 JavaScript 高级程序设计) */ /* 特性是固有的 JavaScript 对象 属性指的 ...
- PAT001 一元多项式求导
题目: 设计函数求一元多项式的导数.(注:xn(n为整数)的一阶导数为n*xn-1.) 输入格式:以指数递降方式输入多项式非零项系数和指数(绝对值均为不超过1000的整数).数字间以空格分隔. 输出格 ...
- ECLIPSE 不能连接MYSQL 8 的现象
连接mysql 出现:java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'. mysq ...
- 网络协议之ts---ts 流分析详解
名词缩写翻译: es:elements stream 基本流 pes:packet elements stream 打包流 pts:presentation time stamp 显示时间戳 dts: ...
- XML转换成数组方法
<?php function xmlToArray2($xml) { // 将XML转为array $array_data = json_decode(json_encode(simplexml ...
- jvm之 国际酒店 一次报表 load数据死循环导致的FULLGC
从目前这几天的运行情况看,每天晚上0点到3点,应该是你们那边有大数据任务处理,在这个时间段,SOA会频繁报ZK断开重联的告警,见下图. 类似的问题,在CRM系统上也有出现过,我们dump内存,分析 ...
- 基于字典SR各种方法【稀疏编码多种方法】
基于字典的图像超分辨率实现 - CSDN博客 http://blog.csdn.net/u011630458/article/details/65635155 简介 这段时间在看基于字典的单帧图像超分 ...
- java 包冲突解决方法
1.诊断包冲突 java.lang.NoSuchMethodError: org.apache.commons.io.output.DeferredFileOutputStream.<init& ...
- 爬虫实战【9】Selenium解析淘宝宝贝-获取宝贝信息并保存
通过昨天的分析,我们已经能到依次打开多个页面了,接下来就是获取每个页面上宝贝的信息了. 分析页面宝贝信息 [插入图片,宝贝信息各项内容] 从图片上看,每个宝贝有如下信息:price,title,url ...
- js实现查询关键词,使其高亮
今天做了一个功能:在页面上查询关键,使其高亮显示,实现代码如下: css: <style type="text/css"> .highlight { backgroun ...