瑞芯微RK3566开发板OpenHarmony标准系统应用兼容性测试指导触觉智能Purple Pi OH演示
<div class='showpostmsg'><p data-track="9">本文<strong>OpenHarmony标准系统应用兼容性测试指导,适用鸿蒙系统软件开发测试的新手入门学习课程</strong>。设备为触觉智能的瑞芯微RK3566开发板,型号Purple Pi OH。是Laval官方社区主荐的一款鸿蒙开发主板。支持Openharmony、安卓Android、Linux的Debian、Ubuntu系统。</p><p data-first-child="" data-pid="y4HKEaOF"><b>一、编译兼容性套件</b></p>
<p> </p>
<p data-pid="IzML9RVq">举例:以Purple-Pi-OH为例:</p>
<ol>
<li data-pid="F-ek89IQ">首先需要把SDK编译一遍,参考文章:<br />
<u><a data-za-detail-view-id="1043" href="https://link.zhihu.com/?target=http%3A//www.industio.cn/product-item-37.html" rel="nofollow noreferrer" target="_blank">http://www.industio.cn/product-item-37.html</a></u></li>
<li data-pid="BW7Js8B0">全量编译:/test/xts/acts目录下执行编译命令:<br />
<code class="hljs">./build.sh product_name=purple_pi_oh system_size=standard</code></li>
<li data-pid="nAgOvBNE">测试用例输出在目录:out/release/suites/acts/testcases</li>
<li data-pid="ZTLCD0MC">测试框架&用例整体输出目录:out/release/suites/acts(根据自身目录查看)</li>
</ol>
<p> </p>
<p data-pid="7EpnOY17"><b>二、资源下载</b></p>
<p data-pid="iWlg5-fm"><b>2.1 兼容性套件下载</b></p>
<ol>
<li data-pid="yAkKyMnS">兼容性套件也能通过鸿蒙官网获取:<u><a data-za-detail-view-id="1043" href="https://link.zhihu.com/?target=https%3A//www.openharmony.cn/certification/document/xts/" rel="nofollow noreferrer" target="_blank">https://www.openharmony.cn/certification/document/xts/</a> </u>如下图所示:</li>
</ol>
<p> </p>
<figure data-size="normal">
<p> </p>
<div style="text-align: center;"></div>
<p> </p>
</figure>
<p> </p>
<ol>
<li data-pid="EpwxgZOz">解压生成acts目录,如下图所示:</li>
</ol>
<p> </p>
<figure data-size="normal">
<p> </p>
<div style="text-align: center;"></div>
<p> </p>
</figure>
<p> </p>
<p data-pid="FnxK-7pb"><b>2.2 resource文件下载</b></p>
<ol>
<li data-pid="ZjzSv__9">选择对应分支与系统类型下载resource文件,如下图所示:</li>
</ol>
<p> </p>
<figure data-size="normal">
<p> </p>
<div style="text-align: center;"></div>
<p> </p>
</figure>
<p> </p>
<ol>
<li data-pid="9UEvCBGV">拷贝到acts\resource目录下,如下图所示:</li>
</ol>
<p> </p>
<figure data-size="normal">
<p> </p>
<div style="text-align: center;"></div>
<p> </p>
</figure>
<p> </p>
<p> </p>
<p> </p>
<p data-pid="2MbJgEKg"><b>三、配置运行环境</b></p>
<p> </p>
<p> </p>
<ol>
<li data-pid="yQ6lDY5P">安装python3.7及以上版本</li>
</ol>
<p> </p>
<figure data-size="normal">
<p> </p>
<div style="text-align: center;"></div>
<p> </p>
</figure>
<p> </p>
<ol>
<li data-pid="mVSqiXIn">安装setuptools(pip install setuptools)</li>
</ol>
<p data-pid="tONVrGB9">在cmd中执行命令:</p>
<pre>
<code>pip install setuptools</code></pre>
<ol>
<li data-pid="dXZIRnBL">安装pyserial( pip install pyserial )</li>
</ol>
<p data-pid="BVqr8x0w">在cmd中执行命令:</p>
<pre>
<code>pip install pyserial</code></pre>
<ol>
<li data-pid="_72-f6iq">安装rsa( pip install rsa )</li>
</ol>
<p data-pid="vAhS09GT">在cmd中执行命令:</p>
<pre>
<code>pip install rsa</code></pre>
<ol>
<li data-pid="IM773GzU">安装dateutil(pip install python-dateutil)</li>
</ol>
<p data-pid="LF7bKCXt">在cmd中执行命令:</p>
<pre>
<code>pip install python-dateutil</code></pre>
<ol>
<li data-pid="0J25SpLE">查看设备信息</li>
</ol>
<p data-pid="YwTYDbb_">在cmd中执行命令:</p>
<pre>
<code>C:\Users\industio>hdc list targets
150100414a5444345206c363e27d3a00
C:\Users\industio>hdc discover
Please add HDC server's firewall ruler to allow udp incoming, udpport:8710
Broadcast find daemon, total:0
C:\Users\industio>hdc shell ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNINGMTU:65536Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:0
eth0 Link encap:EthernetHWaddr aa:cc:bc:66:ac:9cDriver rk_gmac-dwmac
inet addr:192.168.0.160Bcast:192.168.0.255Mask:255.255.255.0
inet6 addr: fe80::a8cc:bcff:fe66:ac9c/64 Scope: Link
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:2600 errors:0 dropped:80 overruns:0 frame:0
TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:264523 TX bytes:24139
Interrupt:467. 配置user_config.xml文件路径:</code></pre>
<p data-pid="gv7ec69T"><code class="hljs">\suites\acts\config\user_config.xml</code></p>
<pre>
<code><user_config>
<environment>
<support_device>
<device>true</device>
</support_device>
<device type="usb-hdc">
<ip>127.0.0.1</ip>
<port>8710</port>
<sn>150100414a5444345206c363e27d3a00</sn>
</device>
</environment>
<testcases>
<dir></dir>
</testcases>
<resource>
<dir></dir>
</resource>
</user_config></code></pre>
<p> </p>
<p data-pid="G0u7o_dg"><b>四、执行兼容性测试套件</b></p>
<p data-pid="oukZiqIw">1. 进入acts目录下,直接执行run.bat,并查看对应的设备信息,如下图所示:</p>
<figure data-size="normal">
<p> </p>
<div style="text-align: center;"></div>
<p> </p>
</figure>
<p> </p>
<p data-pid="EXwv4HQ7">2. 界面启动后,输入用例执行指令,全量执行</p>
<pre>
<code>run acts</code></pre>
<figure data-size="normal">
<p> </p>
<div style="text-align: center;"></div>
<p> </p>
</figure>
<p data-pid="eDDYYEqO"><b>五、查看测试报告</b></p>
<p data-pid="I_8Zrlnf">1. 进入acts\reports\目录,获取当前的执行记录,打开“summary_report.html”可以获取到测试报告,如下图所示:</p>
<p> </p>
<figure data-size="normal">
<p> </p>
</figure>
<p> </p>
<p data-pid="uFdT4AJ8">2. 当出现Failed、Blocked、Unavailable时,将错误模块和没有跑到的模块可以单独、多个一起运行,确保每个模块都可以通过,如下图所示:</p>
<p> </p>
<figure data-size="normal">
<p> </p>
</figure>
<p> </p>
<p data-pid="8halpBlU">3. 模块执行(具体模块可以查看\acts\testcases)</p>
<pre>
<code>run –l ActsSamgrTest</code></pre>
<p data-pid="tVpq3Kfe">4. 多个模块运行时需要用分号隔开,命令如下:</p>
<pre>
<code>run –l ActsSamgrTest;actsAceWebViewWebStorageJsunit;xxx;xxx</code></pre>
<p data-pid="2Qh6U6ra">注:其余模块如ssts、hats、dcts操作步骤类似,可参考进行操作。</p>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>
页:
[1]