管理员 发表于 2021-3-31 16:10:01

如何通过 IDE 的预检测功能提高审核通过率

<h1 id="toc_0" style="font-size: 1.8em; font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(211, 54, 130); white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;">如何通过 IDE 的预检测功能提高审核通过率</h1><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">快应用审核,需要经过联盟官方初审,通过后再有各家厂商复审;外加需要再多机型验证等,或可能使得上线耗时较长。快应用 IDE,计划构建并完善「预检测」功能,帮助开发者尽可能提前发现些问题,从而加快审核流程、提升应用体验。「预检测」目前分为静态和动态,两个方面,本篇文章跟大家做下分享,欢迎提出您宝贵的意见和建议。</p><h2 id="toc_1" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.6em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">静态检测</h2><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">快应用静态检测,是针对快应用审核相关问题进行检测的工具。它通过静态代码巡检,来对业务合规性等进行分析,同时给出建议,用于帮助开发者:提前发现和定位可能影响快应用提审的问题;以提高审核通过率。关于快应用审核规则,详情请参见<a href="https://www.quickapp.cn/docCenter/post/88" target="_blank">《快应用自查指南》</a>。</p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">用户可以通过在插件市场安装插件使用该功能,该插件为<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Inconsolata, sans-serif; font-size: 1em; background-color: rgb(7, 54, 66); padding: 2px;">hap-static-detection</code>,在 IDE 中,也可通过上传功能的入口直接安装插件。</p><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;"><img src="/data/ueditor/image/20210331/1617177772186327.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><h3 id="toc_2" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.4em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">检测标准</h3><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 0em;">IDE 会根据以下几个方面对代码进行静态检测(后续将抽象出更多检测项):</p><ul style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;" class=" list-paddingleft-2"><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">RPK 尺寸是否合规:如果未分包,rpk 不能超过 1M;如果分包,整个快应用的所有分包大小不超过 4M,单个分包/基础包大小不能超过 1M。</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否适配 menuBar:首页,必须开启 menuBar;不允许定制 menuBar。</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否为套壳 h5 应用:应用不得是简单打包的网站页面或套用模板、内容聚合或罗列链接。</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否有拉起第三方应用:应用功能,不能依赖于跳转无关网页或者无关第三方程序(不得出现拉起主程序)。</p></li></ul><h2 id="toc_3" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.6em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">动态检测</h2><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">动态检测,是基于厂商提供的「云测」功能,对所构建的 RPK,上传至云真机,进行自动化检测,帮助开发者,提前发现快应用可能存在缺陷,从而提高审核通过率和服务体验。检测项包含:首次启动耗时,内存占用,CPU 占用率,是否存在崩溃、黑白屏异常等内容(使用云测,需安装平台插件)。</p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">用户可以通过插件市场安装插件使用该功能,该插件为<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Inconsolata, sans-serif; font-size: 1em; background-color: rgb(7, 54, 66); padding: 2px;">hap-vivo-stf</code>,目前只有 vivo 接入了云测的相关内容。</p><h3 id="toc_4" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.4em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">选择平台</h3><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">在安装了插件之后,通过快捷入口的「<strong>云测</strong>」按钮,进入该功能,目前只有 vivo 一家接入云测,选择 vivo 云测。</p><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;"><img src="/data/ueditor/image/20210331/1617177774619468.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><h3 id="toc_5" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.4em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">登录</h3><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">本功能需要先注册 vivo 开发者平台的账号才可使用,点击下方注册按钮,可前往注册,注册成功之后,在 IDE 中登录账号。</p><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;"><img src="/data/ueditor/image/20210331/1617177775896708.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><h3 id="toc_6" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.4em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">创建测试</h3><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">在创建测试界面,如果有正在测试中的项目,会显示有项目正在测试,此时,可以选择继续创建测试或者查看历史报告;如果有已经测试过后的项目,则会显示最近的一次测试结果在下方。</p><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;"><img src="/data/ueditor/image/20210331/1617177775611729.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 0em;">点击创建测试,会询问是否把 rpk 上传至服务端进行动态检测,点击确认之后到下一步。</p><h3 id="toc_7" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.4em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">选择机型</h3><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">在确认了把 rpk 上传至服务端之后,可以进行机型的选择,可根据自己的需要选择不同型号、不同系统版本、不同引擎版本的手机进行测试。</p><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;"><img src="/data/ueditor/image/20210331/1617177777716763.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">tips:选择的机型超过一个,可能需要较长的测试时间。</p><h3 id="toc_8" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.4em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">生成报告</h3><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 2em;">在选择了机型之后,IDE 会自动把 rpk 上传至服务端进行动态检测,检测完成之后,用户可以在生成报告界面或者历史报告界面查看报告。</p><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;"><img src="/data/ueditor/image/20210331/1617177777755696.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><h3 id="toc_9" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.4em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">报告分析</h3><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">动态检测的报告中,我们将分为三个部分来介绍:</p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-indent: 0em;">&nbsp; &nbsp; &nbsp; 1、基础信息:包括包名、版本号、提交时间。<br/>&nbsp; &nbsp; &nbsp; 2、检测结果:如果下方的检测项出现错误,则会在检测结果上提示哪台手机出现错误。<br/>&nbsp; &nbsp; &nbsp; 3、各设备检测结果:选择的机型中的各个设备的检测结果。</p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">接下来,我将着重介绍设备的检测结果:</p><h4 id="toc_10" style="font-family: &quot;PT Sans Narrow&quot;, sans-serif; color: rgb(133, 153, 0); font-size: 1.2em; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">设备检测结果</h4><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">设备信息:安卓版本、分辨率、运行内存、内部储存空间、屏幕大小</p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">设备性能参数:再次启动时间、列表滑动帧率、CPU 占用率、FPS</p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">重要检测项:</p><ul style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;" class=" list-paddingleft-2"><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">首次启动时间:首次启动耗时下限设定为 4000ms;耗时过长,会导致用户看到的都是白屏或者内容有缺失。建议检查加载过程中的所有操作,看是否存在请求数据耗时过长,或者一次性渲染数据过大的情况;当然您也可以考虑引入「骨架屏」功能。</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">内存占用为:快应用内存占用下限,设定为 600M;请检查是否存耗费内存的操作,如内存泄漏,没有复用的超长列表,很多大尺寸图片等。</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否成功安装</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否成功启动</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否有卡死现象</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否有崩溃现象</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否成功卸载</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否正常运行</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">是否出现黑屏或者白屏异常</p></li><li><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px;">问题截图:当有出现异常、崩溃、卡死、UI 异常、启动失败时,会有相应的截图显示,若无这些错误则不会有问题截图显示</p></li></ul><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;"><img src="/data/ueditor/image/20210331/1617177778934076.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><p style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto; line-height: 2em; margin-top: 10px; margin-bottom: 10px;">tips:此篇文章所介绍的动态检测的内容优化,将在 IDE 3.9.0 推出,现阶段的云测内容如下图所示:</p><p style="line-height: 2em; margin-top: 10px; margin-bottom: 10px; text-align: center;"><img src="/data/ueditor/image/20210331/1617177779793675.png" style="border: 0px; max-width: 100%; padding: 0.8em 0em; caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; white-space: normal; text-size-adjust: auto;"/><span style="caret-color: rgb(131, 148, 150); color: rgb(131, 148, 150); font-family: &quot;PT Sans&quot;, sans-serif; font-size: medium; text-size-adjust: auto; background-color: rgb(0, 43, 54);"></span></p><p><br/></p>

DYT副业 发表于 2024-4-23 00:08:35

雨天免费资源分享网
页: [1]
查看完整版本: 如何通过 IDE 的预检测功能提高审核通过率