{"id":1608,"date":"2024-04-09T10:12:58","date_gmt":"2024-04-09T02:12:58","guid":{"rendered":"https:\/\/www.gyxwsjdxh.com\/?p=1608"},"modified":"2024-04-09T10:12:58","modified_gmt":"2024-04-09T02:12:58","slug":"app-ui%e8%87%aa%e5%8a%a8%e5%8c%96%e6%b5%8b%e8%af%95%e5%b8%b8%e8%a7%81%e9%9d%a2%e8%af%95%e9%a2%98%e5%b0%8f%e7%bb%93","status":"publish","type":"post","link":"https:\/\/www.gyxwsjdxh.com\/1608.html","title":{"rendered":"APP UI\u81ea\u52a8\u5316\u6d4b\u8bd5\u5e38\u89c1\u9762\u8bd5\u9898\u5c0f\u7ed3"},"content":{"rendered":"\n

\n

1.Android APP \u5185\u5b58\u4e0d\u8db3\u65f6\uff0c\u5982\u4f55\u83b7\u5f97\u5185\u5b58\uff1f<\/span><\/strong><\/p>\n

\u7cfb\u7edf\u4f18\u5148\u7ed3\u675f\u88ab\u6302\u8d77\uff08\u6682\u505c\uff09\u7684\u8fdb\u7a0b\uff0c\u91ca\u653e\u5185\u5b58\u3002<\/span><\/span><\/p>\n

2.APP \u6d4b\u8bd5\u5e38\u89c1\u95ee\u9898\u6709\u54ea\u4e9b\uff1f\u539f\u56e0\u6709\u54ea\u4e9b\uff1f<\/span><\/strong><\/span><\/p>\n

\u5e38\u89c1\u7684\u6709 crash\u3001ANR\uff08\u5e94\u7528\u65e0\u54cd\u5e94\u3001\u5361\u6b7b\uff09\uff0c\u4e00\u822c\u7531\u8bbe\u5907\u788e\u7247\u5316\u3001\u7f51\u7edc\u6ce2\u52a8\u5927\u3001\u5185\u5b58\u6cc4\u6f0f\u3001\u4ee3\u7801\u7f16\u5199\u9519\u8bef\u3002<\/span><\/span><\/p>\n

3.APP \u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u5177<\/span><\/strong><\/span><\/p>\n

\u5f00\u653e\u6027\u95ee\u9898\uff0c\u5e26\u70b9\u4e3b\u89c2\u610f\u89c1\uff1a<\/span><\/span><\/p>\u5bf9\u6bd4\u5176\u4ed6\u719f\u6089\u7684\u81ea\u52a8\u5316\u5de5\u5177\u7684\u4f18\u7f3a\u70b9\uff1b<\/span><\/span>\u81ea\u52a8\u5316\u7684\u7b80\u8981\u65b9\u6848\uff08\u7b80\u8981\u7684\u540c\u65f6\u5173\u952e\u5185\u5bb9\u8bf7\u5177\u4f53\uff09\u3002<\/span><\/span>\n

4.Android \u4e0e web \u6d4b\u8bd5\u533a\u522b\uff1f<\/span><\/strong><\/span><\/p>\n

\u76f8\u540c\u70b9\uff1a<\/span><\/strong><\/span><\/p>\u8bbe\u8ba1\u6d4b\u8bd5\u7528\u4f8b\u5747\u4f9d\u636e\u7b49\u4ef7\u7c7b\u3001\u8fb9\u754c\u503c\u7b49\u65b9\u6cd5\uff0c\u6d4b\u8bd5\u539f\u7406\u76f8\u540c\uff1b<\/span><\/span>\u5927\u591a\u6570\u90fd\u91c7\u7528\u9ed1\u76d2\u6d4b\u8bd5\u65b9\u6cd5\u6765\u9a8c\u8bc1\u4e1a\u52a1\u529f\u80fd\uff1b<\/span><\/span>\u9700\u8981\u68c0\u67e5\u754c\u9762\u5e03\u5c40\u3001\u98ce\u683c\u548c\u6309\u94ae\u662f\u5426\u7f8e\u89c2\u3001\u7edf\u4e00\u7b49\uff08UI \u6d4b\u8bd5\uff09\uff1b<\/span><\/span>\u6d4b\u8bd5\u9875\u9762\u8f7d\u5165\u548c\u7ffb\u9875\u7684\u901f\u5ea6\u3001\u767b\u5f55\u65f6\u957f\u662f\u5426\u6ea2\u51fa\u7b49\u95ee\u9898\uff08\u6027\u80fd\u6d4b\u8bd5\uff09\uff1b<\/span><\/span>\u6d4b\u8bd5\u5e94\u7528\u7cfb\u7edf\u7684\u7a33\u5b9a\u6027\u3002<\/span><\/span>\n

\u4e0d\u540c\u70b9\uff1a<\/span><\/strong><\/span><\/p>\u624b\u673a\u4f5c\u4e3a\u901a\u4fe1\u5de5\u5177\uff0c\u901a\u4fe1\u7b49\u4e00\u4e9b\u884c\u4e3a\u4f1a\u5bf9 APP \u4ea7\u751f\uff08\u4e2d\u65ad\u6d4b\u8bd5\uff09\uff1b<\/span><\/span>\u624b\u673a\u7528\u6237\u5bf9 app \u4ea7\u54c1\u7684\u5b89\u88c5\u5378\u8f7d\u64cd\u4f5c\uff1a\u4ece\u4e0a\u4e00\u7248\u672c\/\u4e0a\u4e24\u4e2a\u7248\u672c\u76f4\u63a5\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\uff08\u5b89\u88c5\u5378\u8f7d\u6d4b\u8bd5\uff09\uff1b<\/span><\/span>web \u81ea\u52a8\u5316\u6d4b\u8bd5\u4f7f\u7528\u7684\u5de5\u5177\u8f83\u5e38\u7528\u7684\u662f selenium\uff0c\u800c android \u624b\u673a\u81ea\u52a8\u5316\u6d4b\u8bd5\u6bd4\u8f83\u5e38\u7528\u7684\u81ea\u52a8\u5316\u5de5\u5177\u662f monkey\u3001monkeyrunner\u3001Appium\uff08\u6d4b\u8bd5\u5de5\u5177\u4e0d\u4e00\u6837\uff09\u3002<\/span><\/span>\n

5.app \u6d4b\u8bd5\u6709\u54ea\u51e0\u79cd\u73af\u5883\uff1f<\/span><\/strong><\/span><\/p>\u672c\u5730\u73af\u5883\uff1aapp \u5b89\u88c5\u7684\u624b\u673a\u73af\u5883\u548c\u7535\u8111\u642d\u5efa\u7684\u81ea\u52a8\u5316\u6d4b\u8bd5\u73af\u5883\uff08\u6bd4\u5982\u5b89\u5353 SDK \u7b49\uff09;<\/span><\/span>\u670d\u52a1\u5668\u73af\u5883\uff1awar \u5305\u90e8\u7f72\u7684\u670d\u52a1\u5668\uff0c\u670d\u52a1\u5668\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee<\/span><\/span>\n

6.\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0b Android SDK \u7684\u5b89\u88c5\u6b65\u9aa4<\/span><\/strong><\/span><\/p>\u4e0b\u8f7d jdk \u548c\u5b89\u5353 sdk\uff1b<\/span><\/span>\u5b89\u88c5 jdk\uff0c\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff08java_home\u3001classpath\u3001 path\uff09\u3002<\/span><\/span>\n

7.\u4ecb\u7ecd\u79fb\u52a8\u5e94\u7528\u53ca\u5176\u670d\u52a1\u7aef\u7684\u6d4b\u8bd5\u70b9\uff1f<\/span><\/strong><\/span><\/p>\u79fb\u52a8\u5e94\u7528\u4e3b\u8981\u6709\u6743\u9650\u3001\u5b89\u88c5\u8fd0\u884c\u5378\u8f7d\u3001UI\u3001\u529f\u80fd\u3001\u6027\u80fd\u3001\u4e2d\u65ad\u3001\u517c\u5bb9\u6027\u3001\u5b89\u5168\u6027\u3001 \u56de\u5f52\u3001\u5347\u7ea7\u66f4\u65b0\u3001\u7528\u6237\u4f53\u9a8c\uff08app \u7684 11 \u5927\u6d4b\u8bd5\u70b9\uff09\uff1b<\/span><\/span>\u670d\u52a1\u7aef\u6709\u63a5\u53e3\u6d4b\u8bd5\u3001\u6027\u80fd\u6d4b\u8bd5\u3001\u5b89\u5168\u6d4b\u8bd5\u3002<\/span><\/span>\n

8.\u5982\u4f55\u5224\u65ad bug \u662f\u5ba2\u6237\u7aef\u8fd8\u662f\u540e\u53f0\u95ee\u9898\uff1f<\/span><\/strong><\/span><\/p>\n

\u8fd9\u4e2a\u8981\u6839\u636e\u4e1a\u52a1\u6765\uff0c\u4e00\u822c\u6570\u636e\u7684\u95ee\u9898\u524d\u7aef\u7684\u95ee\u9898\u591a\u4e9b\uff0c\u4e00\u822c\u505a\u6cd5\u662f\u6709\u95ee\u9898\u63d0\u7ed9\u524d\u7aef\u5f00\u53d1\uff0c \u4ed6\u4eec\u77e5\u9053\u662f\u4ed6\u4eec\u81ea\u5df1\u7684\u95ee\u9898\u8fd8\u662f\u540e\u53f0\u8fd4\u56de\u7684\u6570\u636e\u95ee\u9898\u3002<\/span><\/span><\/p>\n

9.\u5b89\u5353\u4e2d\u5982\u4f55\u53d6\u51fa\u65e5\u5fd7\u4fe1\u606f<\/span><\/strong><\/span><\/p>\u628a\u5b89\u5353\u7cfb\u7edf\u65e5\u5fd7\u4fe1\u606f\u5b9e\u65f6\u5bfc\u5165\u5230\u672c\u5730\uff1aadb logcat -v time > d:\\mylog.log\uff1b<\/span><\/span>\u8fd0\u884c\u4f7f\u7528\u67d0\u4e2a app\uff0c\u5b9e\u65f6\u83b7\u53d6\u8be5 app \u7684\u65e5\u5fd7\u4fe1\u606f\uff08cmd \u91cc\u9762\u7684\u8fd4\u56de\u4fe1\u606f\uff09 \uff1aadb shell monkey -p com.android.calendar -v 1000 > d:\\mylog2.log\u3002<\/span><\/span>\n

10.\u5e38\u89c1\u7684 adb \u547d\u4ee4<\/span><\/strong><\/span><\/p>\u67e5\u770b\u5f53\u524d\u8fde\u63a5\u7684\u8bbe\u5907\uff1aadb devices\uff1b<\/span><\/span>\u5b89\u88c5\u8f6f\u4ef6\uff1aadb install \u8def\u5f84\\xx.apk\uff1b<\/span><\/span>\u5378\u8f7d\u8f6f\u4ef6\uff1aadb uninstall <\u5305\u540d>\uff1b<\/span><\/span>\u4ece\u7535\u8111\u4e0a\u53d1\u9001\u6587\u4ef6\u5230\u8bbe\u5907\uff1aadb push <\u672c\u5730\u8def\u5f84> <\u8fdc\u7a0b\u8def\u5f84> adb push C:\\test1.txt \/sdcard\/\uff1b<\/span><\/span>\u4ece\u8bbe\u5907\u4e0a\u4e0b\u8f7d\u6587\u4ef6\u5230\u7535\u8111\uff1aadb pull <\u8fdc\u7a0b\u8def\u5f84> <\u672c\u5730\u8def\u5f84> adb pull \/sdcard\/test1.txt D:<\/span><\/span>\u5b9e\u65f6\u83b7\u53d6\u65e5\u5fd7\uff1aadb logcat -v time > D:\\mylog.log\uff1b<\/span><\/span>\u767b\u5f55\u7ec8\u7aef\u8bbe\u5907 shell\uff1aadb shell\uff1b<\/span><\/span>\u67e5\u627e\u5305\u540d\/\u6d3b\u52a8\u540d\uff1aadb logcat | findstr START \uff08\u811a\u672c\u4e2d\uff0c cmp= \u540e\u9762\u7684\u503c\u5c31\u662f \u5305\u540d\/activity \u540d\u79f0\uff09\uff1b<\/span><\/span>\u542f\u52a8 APP \u542f\u52a8\uff1b<\/span><\/span>adb shell am start -n packageName\/activity\uff1b<\/span><\/span>\u5173\u95ed app \u8bed\u6cd5\uff1aadb shell am force-stop \u5305\u540d\uff1b<\/span><\/span>\u76d1\u63a7 APP \u542f\u52a8\u65f6\u95f4 adb shell am start -W packageName\/activity\uff1b<\/span><\/span>Monkey \u547d\u4ee4\uff1aadb shell monkey -v -p mypackage 50<\/span><\/span>\n

11.APP \u8fd9\u4e48\u591a\u4e3b\u6d41\u673a\u578b\u5982\u4f55\u6d4b\u8bd5<\/span><\/strong><\/span><\/p>\n

\u6211\u624b\u673a\u578b\u53f7\u5206\u522b\u6709\u9b45\u65cf\uff0c\u534e\u4e3a\uff0c\u5c0f\u7c73\uff0ciphone7\u3001iphone8 \u3001iphone8plus \u3001iphone x \u6d4b\u8bd5\u517c\u5bb9\u6027\uff0c\u6709\u4e9b\u6ca1\u6709\u7684\u673a\u578b\uff0c\u5148\u501f\u7528\u540c\u4e8b\u7684\u624b\u673a\u8fdb\u884c\u6d4b\u8bd5\uff0c\u540c\u65f6\u7533\u8bf7\u516c\u53f8\u8d2d\u4e70\uff0c\u6216\u8005\u91c7 \u7528\u4e91\u771f\u673a\u3002<\/span><\/span><\/p>\n

12.App \u5d29\u6e83\uff08\u95ea\u9000\uff09\u539f\u56e0<\/span><\/strong><\/span><\/p>\n

\u7f13\u5b58\u5783\u573e\u8fc7\u591a\uff1a\u7531\u4e8e\u5b89\u5353\u7cfb\u7edf\u7684\u7279\u6027\u5982\u679c\u957f\u65f6\u95f4\u4e0d\u6e05\u7406\u5783\u573e\u6587\u4ef6\uff0c\u4f1a\u5bfc\u81f4\u8d8a\u6765\u8d8a\u5361\u4e5f\u4f1a\u51fa\u73b0\u95ea\u9000\u60c5\u51b5\uff0c\u8fd0\u884c\u7684\u7a0b\u5e8f\u8fc7\u591a\u5bfc\u81f4\u5185\u5b58\u4e0d\u8db3\u3002<\/span><\/span><\/p>\n

\u5e94\u7528\u7248\u672c\u517c\u5bb9\u95ee\u9898\uff1a\u5982\u679c\u5e94\u7528\u7248\u672c\u592a\u4f4e\uff0c\u4f1a\u5bfc\u81f4\u4e0d\u517c\u5bb9\uff0c\u9020\u6210\u95ea\u9000\u3002\u6b64\u5916\uff0c\u6709\u4e9b\u65b0\u7248\u672c \u5728\u8c03\u8bd5\u4e2d\uff0c\u4e5f\u4f1a\u9020\u6210\u5e94\u7528\u95ea\u9000\u3002<\/span><\/span><\/p>\n

\u89e3\u51b3\u65b9\u6cd5\uff1a\u5982\u679c\u662f\u7248\u672c\u592a\u65e7\uff0c\u66f4\u65b0\u4e3a\u65b0\u7248\u672c\u5373\u53ef\uff1b\u5982\u679c\u662f\u65b0\u7248\u672c\u95ea\u9000\uff0c \u53ef\u80fd\u662f\u5e94\u7528\u5728\u6539\u7248\u8c03\u8bd5\uff0c\u53ef\u5378\u8f7d\u540e\u5b89\u88c5\u65e7\u7248\u3002\u68c0\u67e5 APP \u4e2d\u8bbf\u95ee\u7f51\u7edc\u7684\u5730\u65b9\uff0c\u7ec4\u4ef6\u4e2d\u7684 ImageView \u662f\u5426\u53ef\u4ee5\u6b63\u5e38\u7684\u4e0b\u8f7d\u5e76\u663e\u793a\u5230 app \u9875\u9762\u4e0a\u3002\u68c0\u67e5 APP \u7684 sdk \u548c\u624b\u673a\u7684\u7cfb\u7edf\u662f\u5426\u517c\u5bb9\u3002\u5728\u4e00\u4e9b\u7279\u5b9a\u60c5\u51b5\u4e0b\u7684\u95ea\u9000,\u6bd4\u5982\u64ad\u653e\u89c6\u9891,\u5728 Android5.0 \u5347\u7ea7\u5230 Android6.0 \u7684\u65f6\u5019, \u6709\u4e9b\u7cfb\u7edf API \u8001\u7248\u672c\u6709,\u65b0\u7248\u672c\u6ca1\u6709,\u5230\u65f6\u56de\u53bb\u5bf9\u8c61\u7684\u65f6\u5019\u5931\u8d25,\u62a5\u7a7a,\u7cfb\u7edf\u5c31\u4f1a\u51fa\u73b0\u95ea\u9000\u3002<\/span><\/span><\/p>\n

13.Appium \u90fd\u6709\u54ea\u4e9b\u542f\u52a8\u65b9\u5f0f<\/span><\/strong><\/span><\/p>\u5ba2\u6237\u7aef\u542f\u52a8\uff1b<\/span><\/span>\u547d\u4ee4\u884c\u542f\u52a8\u3002<\/span><\/span>\n

14.\u5b89\u5353 UI \u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u5177<\/span><\/strong><\/span><\/p>\n

appium\uff1a\u662f\u4e00\u4e2a\u79fb\u52a8\u7aef\u7684\u81ea\u52a8\u5316\u6846\u67b6\uff0c\u53ef\u7528\u4e8e\u6d4b\u8bd5\u539f\u751f\u5e94\u7528\uff0c\u79fb\u52a8\u7f51\u9875\u5e94\u7528 \u548c\u6df7\u5408\u578b\u5e94\u7528\uff0c\u4e14\u662f\u8de8\u5e73\u53f0\u7684\u3002<\/span><\/span><\/p>\n

robotium\uff1a\u662f\u4e00\u6b3e\u56fd\u5916\u7684 Android \u81ea\u52a8\u5316\u6d4b\u8bd5\u6846\u67b6\uff0c\u4e3b\u8981\u9488\u5bf9 Android \u5e73\u53f0\u7684\u5e94\u7528\u8fdb\u884c\u9ed1\u76d2\u81ea\u52a8\u5316\u6d4b\u8bd5\uff0c\u5b83\u63d0\u4f9b\u4e86\u6a21\u62df\u5404\u79cd\u624b\u52bf\u64cd\u4f5c\uff08\u70b9\u51fb\u3001\u957f\u6309\u3001\u6ed1\u52a8\u7b49\uff09\u3001\u67e5\u627e\u548c\u65ad\u8a00\u673a\u5236\u7684 API\uff0c\u80fd\u591f\u5bf9\u5404\u79cd\u63a7\u4ef6\u8fdb\u884c\u64cd\u4f5c\u3002<\/span><\/span><\/p>\n

15.Android \u624b\u673a\u548c IOS \u7cfb\u7edf\u533a\u522b<\/span><\/strong><\/span><\/p>\n

\u4e24\u8005\u8fd0\u884c\u673a\u5236\u4e0d\u540c\uff1aIOS \u91c7\u7528\u7684\u662f\u6c99\u76d2\u8fd0\u884c\u673a\u5236\uff0c\u5b89\u5353\u91c7\u7528\u7684\u662f\u865a\u62df\u673a\u8fd0\u884c\u673a\u5236\u3002<\/span><\/span><\/p>\n

\u4e24\u8005\u540e\u53f0\u5236\u5ea6\u4e0d\u540c\uff1aIOS \u4efb\u4f55\u7b2c\u4e09\u65b9\u7a0b\u5e8f\u90fd\u4e0d\u80fd\u5728\u540e\u53f0\u8fd0\u884c\uff1b\u5b89\u5353\u4e2d\u4efb\u4f55\u7a0b\u5e8f\u90fd \u80fd\u5728\u540e\u53f0\u8fd0\u884c\uff0c\u76f4\u5230\u6ca1\u6709\u5185\u5b58\u624d\u4f1a\u5173\u95ed\u3002<\/span><\/span><\/p>\n

IOS \u4e2d\u7528\u4e8e UI \u6307\u4ee4\u6743\u9650\u6700\u9ad8\uff0c\u5b89\u5353\u4e2d\u6570\u636e\u5904\u7406\u6307\u4ee4\u6743\u9650\u6700\u9ad8\u3002<\/span><\/span><\/p>\n\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"

1.Android APP \u5185\u5b58\u4e0d\u8db3\u65f6\uff0c\u5982\u4f55\u83b7\u5f97\u5185\u5b58\uff1f \u7cfb\u7edf\u4f18\u5148\u7ed3\u675f\u88ab\u6302\u8d77\uff08\u6682\u505c\uff09\u7684\u8fdb\u7a0b\uff0c\u91ca\u653e\u5185\u5b58\u3002 2.APP \u6d4b\u8bd5\u5e38\u89c1\u95ee\u9898\u6709\u54ea\u4e9b\uff1f\u539f\u56e0\u6709… <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-1608","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/posts\/1608"}],"collection":[{"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/comments?post=1608"}],"version-history":[{"count":1,"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/posts\/1608\/revisions"}],"predecessor-version":[{"id":1609,"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/posts\/1608\/revisions\/1609"}],"wp:attachment":[{"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/media?parent=1608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/categories?post=1608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gyxwsjdxh.com\/wp-json\/wp\/v2\/tags?post=1608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}