appium啟動運行log分析

來源:互聯網
上載者:User

標籤:exist   started   from   version   nec   col   boot   timeout   can   

 

1、手動啟動appium 服務

> 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 22 --automation-name Appium --device-name "lge-nexus_4-005475cbccd279d4" --log-no-color> info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)> 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,"deviceName":"lge-nexus_4-005475cbccd279d4","platformName":"Android","platformVersion":"22","automationName":"Appium"}> info: Console LogLevel: debug

 

2、【TestScript】發送帶json資料(Capabilities)的POST請求到/wd/hub/session來建立session> info: --> POST /wd/hub/session {"desiredCapabilities":{"appPackage":"com.edusoho.kuozhi","appActivity":"com.edusoho.kuozhi.KuozhiActivity","platformVersion":"5.1.1","automationName":"Appium","sessionOverride":true,"unicodeKeyboard":true,"platformName":"Android","deviceName":"red note3","resetKeyboard":false},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"appPackage":"com.edusoho.kuozhi","appActivity":"com.edusoho.kuozhi.KuozhiActivity","platformVersion":"5.1.1","automationName":"Appium","sessionOverride":true,"unicodeKeyboard":true,"platformName":"Android","deviceName":"red note3","resetKeyboard":false},"requiredCapabilities":{}},"alwaysMatch":{"appPackage":"com.edusoho.kuozhi","appActivity":"com.edusoho.kuozhi.KuozhiActivity","platformVersion":"5.1.1","automationName":"Appium","sessionOverride":true,"unicodeKeyboard":true,"platformName":"Android","deviceName":"red note3","resetKeyboard":false},"firstMatch":[]}> info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_111)> info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : sessionOverride

 

初始化APP應用(沒有擷取到APP但是又Android包(取決於指令碼配置的Capabilities參數))> info: [debug] Didn‘t get app but did get Android package, will attempt to launch it on the device

 

建立appium session> info: [debug] Creating new appium session 2ac0e18a-9120-4e90-a066-c6ddb1a1deaf

 

3、啟動Android appium> info: Starting android appium

 

檢查JDK> info: [debug] Getting Java version> info: Java version is: 1.8.0_111

 

檢查adb> info: [debug] Checking whether adb is present> info: [debug] Using adb from D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe> warn: No app capability, can‘t parse package/activity

 

4、檢查並串連裝置device> info: [debug] Using fast reset? true> info: [debug] Preparing device for session> info: [debug] Not checking whether app is present since we are assuming(假定) it‘s already on the device

 

檢查裝置資訊> info: Retrieving device> info: [debug] Trying to find a connected android device

 

串連裝置> info: [debug] Getting connected devices...> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe devices

 

裝置串連成功> info: [debug] 1 device(s) connected> info: Found device 5977b8a3> info: [debug] Setting device id to 5977b8a3> info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 wait-for-device> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "echo ‘ready‘"

 

開啟logcat> info: [debug] Starting logcat capture> info: [debug] Getting device API level

 

擷取裝置系統API版本> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "getprop ro.build.version.sdk"> info: [debug] Device is at API Level 22> info: Device API level is: 22

 

擷取裝置系統語言> info: [debug] Extracting strings for language: default> info: [debug] Apk doesn‘t exist locally> info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "rm -rf /data/local/tmp/strings.json"

 

5、檢查APP安裝和相關配置資訊沒有卸載已存在APP,因為appium伺服器未設定--full-reset> info: [debug] Not uninstalling app since server not started with --full-reset> info: [debug] Skipping install since we launched with a package instead of an app path

 

把系統的4724連接埠映射到測試裝置的4724連接埠> info: [debug] Forwarding system:4724 to device:4724> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 forward tcp:4724 tcp:4724 

把bootstrap.jar push到裝置

> info: [debug] Pushing appium bootstrap to device...> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 push "C:\\Program Files (x86)\\Appium\\node_modules\\appium\\build\\android_bootstrap\\AppiumBootstrap.jar" /data/local/tmp/ 

讓Unicode鍵盤可用

> info: [debug] Enabling Unicode keyboard support

 

把unicode imeIME push 到裝置中> info: [debug] Pushing unicode ime to device...> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unicode_ime_apk\UnicodeIME-debug.apk" 

擷取裝置當前IME

> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "settings get secure default_input_method"

 

取消裝置當前IME(百度IME小米V6版)> info: [debug] Unsetting IME ‘com.baidu.input_miv6/.ImeService‘

 

設定UnicodeIME為裝置當前IME> info: [debug] Setting IME to ‘io.appium.android.ime/.UnicodeIME‘> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "ime enable io.appium.android.ime/.UnicodeIME"> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "ime set io.appium.android.ime/.UnicodeIME"

 

安裝setting和unlock apk到測試裝置安裝setting apk到測試裝置> info: [debug] Pushing settings apk to device...> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"

 

安裝unlock.apk到測試裝置> info: [debug] Pushing unlock helper app to device...> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"> info: Starting App> info: [debug] Attempting to kill all ‘uiautomator‘ processes> info: [debug] Getting all processes with ‘uiautomator‘> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "ps ‘uiautomator‘"> info: [debug] No matching processes found

 

6、運行測試機上的bootstrap> info: [debug] Running bootstrap> info: [debug] spawning: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.edusoho.kuozhi -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

 

appium socket server在4724連接埠開啟> info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724> info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready> info: [debug] [BOOTSTRAP] [debug] Loading json...

 

註冊crash監聽器> info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.

 

如果裝置鎖屏,則喚醒裝置> info: [debug] Waking up device if it‘s not alive

 

把wake命令push到appium工作隊列> info: [debug] Pushing command to appium work queue: ["wake",{}]> 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] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "dumpsys window"> info: [debug] Screen already unlocked, continuing.

 

把getDataDir命令push到appium工作隊列> info: [debug] Pushing command to appium work queue: ["getDataDir",{}]> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION> info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir> info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"\/data\/local\/tmp"}> info: [debug] dataDir set to: /data/local/tmp

 

把compressedLayoutHierarchy命令push到appium工作隊列> info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]> 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: {"status":0,"value":false}

 

再次檢查裝置API版本> info: [debug] Getting device API level> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "getprop ro.build.version.sdk"> info: [debug] Device is at API Level 22

 

啟動APP> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.edusoho.kuozhi/com.edusoho.kuozhi.KuozhiActivity"

 

讓待測試APP擷取焦點> info: [debug] Waiting for pkg "com.edusoho.kuozhi" and activity "com.edusoho.kuozhi.KuozhiActivity" to be focused> info: [debug] Getting focused package and activity> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "dumpsys window windows"

 

擷取裝置系統版本> info: [debug] executing cmd: D:\Software\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe -s 5977b8a3 shell "getprop ro.build.version.release"> info: [debug] Device is at release version 5.1.1

 

裝置初始化成功,準備接收testscript->appium 伺服器傳過來的命令> info: [debug] Device launched! Ready for commands

 

設定命令預設逾時時間為60秒> info: [debug] Setting command timeout to the default of 60 secs> info: [debug] Appium session started with sessionId 2ac0e18a-9120-4e90-a066-c6ddb1a1deaf

 

7.反饋最開始POST的請求結果> info: <-- POST /wd/hub/session 303 10052.520 ms - 74

appium啟動運行log分析

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.