155 Star 255 Fork 3.2K

OpenHarmony / xts_acts

 / 详情

【OpenHarmony】L2XTS测试执行acts\run.bat 提示No module named xdevice

已完成
任务
创建于  
2021-11-15 17:55

开发版型号: T507小熊派开发版
软件版本:Openharmony3.0 tag: OpenHarmony-v3.0-LTS
在Windows工作台上,找到从Linux服务器上拷贝下来的测试套件用例目录,在Windows命令窗口进入对应目录,直接执行acts\run.bat。出现如下错误:
C:\Users\liuzhaoqin>acts\run.bat
C:\Users\liuzhaoqin\python\python.exe: No module named xdevice
C:\Users\liuzhaoqin\acts>

评论 (25)

opensunxi 创建了任务
opensunxi 修改了描述
yexiangbin 负责人设置为alex_hold
展开全部操作日志

是xdevice没安装到环境上,确认下tools目录下是不是没有xdevice对应编译后tar.gz包?

方便的话提供下编译后包或者截图

out/ohos-arm-release/suites/acts/tools/ 该目录为空,没有任何东西。

上面的报错就是这个原因

我这边执行的编译命令:./build.sh suite=acts system_size=standard product_name=T507

编译提示是成功的:
......
[297/305] STAMP obj/test/xts/acts/storage/storagefmssharejstest/storagefmsshare_js_test.stamp
[298/305] ACTION //test/xts/acts/updater/update_test:update_js_test(//build/toolchain/ohos:ohos_clang_arm)
Trying to copy "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/haps/updatejstest.hap" to "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/testcases/updatejstest.hap"
[299/305] ACTION //test/xts/acts/storage/storagedsmjstest:storagedsm_js_test(//build/toolchain/ohos:ohos_clang_arm)
Trying to copy "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/haps/storagedsmjstest.hap" to "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/testcases/storagedsmjstest.hap"
[300/305] STAMP obj/test/xts/acts/updater/update_test/update_js_test.stamp
[301/305] STAMP obj/test/xts/acts/storage/storagedsmjstest/storagedsm_js_test.stamp
[302/305] STAMP obj/test/xts/acts/updater/update.stamp
[303/305] STAMP obj/test/xts/acts/storage/storage.stamp
[304/305] ACTION //test/xts/acts:acts(//build/toolchain/ohos:ohos_clang_arm)
make archive disabled
used: 62 seconds
pycache statistics
manage pycache contents
pycache daemon exit
c targets overlap rate statistics
subsystem files NO. percentage builds NO. percentage overlap rate
ark 420 3.1% 753 5.2% 1.79
utils 205 1.5% 245 1.7% 1.20
third_party 6930 51.0% 7523 51.7% 1.09
aafwk 200 1.5% 200 1.4% 1.00
account 14 0.1% 14 0.1% 1.00
ace 1257 9.2% 1257 8.6% 1.00
appexecfwk 370 2.7% 370 2.5% 1.00
ccruntime 29 0.2% 29 0.2% 1.00
communication 464 3.4% 464 3.2% 1.00
developtools 77 0.6% 77 0.5% 1.00
distributeddatamgr 328 2.4% 328 2.3% 1.00
distributedhardware 33 0.2% 33 0.2% 1.00
distributedschedule 41 0.3% 41 0.3% 1.00
global 19 0.1% 19 0.1% 1.00
graphic 133 1.0% 133 0.9% 1.00
hdf 44 0.3% 44 0.3% 1.00
hiviewdfx 135 1.0% 135 0.9% 1.00
miscservices 62 0.5% 62 0.4% 1.00
multimedia 272 2.0% 272 1.9% 1.00
multimodalinput 29 0.2% 29 0.2% 1.00
notification 127 0.9% 127 0.9% 1.00
powermgr 50 0.4% 50 0.3% 1.00
security 268 2.0% 268 1.8% 1.00
startup 57 0.4% 57 0.4% 1.00
telephony 225 1.7% 225 1.5% 1.00
test 36 0.3% 36 0.2% 1.00
updater 81 0.6% 81 0.6% 1.00
wpa_supplicant-2.9 89 0.7% 89 0.6% 1.00
xts 36 0.3% 36 0.2% 1.00

c overall build overlap rate: 1.07

post_process
=====build T507 successful.
2021-11-16 09:47:40
++++++++++++++++++++++++++++++++++++++++
liuzhaoqin@GZExdroid03:~/work/bearpi_harmony3.0/sdk/test/xts/acts$

T507是你们集成的产品吗,编译过程中没有xdevice内容吗

输入图片说明
这个是编译后目录截图。

安装xdevice后进行编译,目录如下,请问属于正常吗? 另外请问developertest需要安装马?

@GZExdroid03:/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/tools$ ls -al
total 448
drwxrwxr-x 2 liuzhaoqin liuzhaoqin 4096 11月 16 10:37 .
drwxrwxr-x 5 liuzhaoqin liuzhaoqin 4096 11月 16 10:37 ..
-rw-r--r-- 1 liuzhaoqin liuzhaoqin 300054 11月 16 10:34 xdevice-0.0.0-py3.8.egg
-rw-r--r-- 1 liuzhaoqin liuzhaoqin 145936 11月 16 10:35 xdevice_extension-0.0.0-py3.8.egg
@GZExdroid03:
/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/tools$

不需要developertest。 xdevice-0.0.0-py3.8.egg,xdevice_extension-0.0.0-py3.8.egg 这两个包就是xdevice编译后的产物。

 恩 我这边运行起来了, 但是所有模块都报required device does not exist,请问是不是需要配置user_config.xml文件,如何进行配置?

部分log 如下:
testsuite disabled="0" errors="0" failures="0" ignored="0" message="DeviceError: The 'C:\Users\liuzhaoqin\acts\testcases\ActsAnsGetSlotTestCallback.json' required device does not exist" modulename="ActsAnsGetSlotTestCallback" name="ActsAnsGetSlotTestCallback" tests="0" time="0.0" unavailable="1"

请问如何进行排查,谢谢啦

需要配置,您连接的是什么设备?

PC通过usb里连接到小熊派带显示屏的开发版, L2系统, 请问如何进行配置?

舒雄 任务状态待办的 修改为进行中

另外发现在执行acts\run.bat 后会出现如下打印,请问PC是否需要连接外网?
Reading https://pypi.org/simple/xdevice-extension/
Download error on https://pypi.org/simple/xdevice-extension/: timed out -- Some packages may not be found!
Couldn't find index page for 'xdevice-extension' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: timed out -- Some packages may not be found!
No local packages or working download links found for xdevice-extension==0.0.0
error: Could not find suitable distribution for Requirement.parse('xdevice-extension==0.0.0')
"Error occurs to install xdevice_extension-0.0.0-py3.8.egg!"
[2021-11-16 17:13:21,782] [Main] [INFO] [*************** xDevice Test Framework Starting ***************]

run acts
当执行该命令后,会进行acts,然后就会出现上面所说的required device does not exist 错误了。请问如何修复?

连网最好,不过这个报错不影响,"xDevice Test Framework Starting"打印就表明xdevice框架已经启动成功了。

好的 ,运行之后报上面所示的 required device does not exist 这个问题。

user_config.xml中配置:

       <environment>
        <support_device>
            <device>true</device>
        </support_device>
        <device type="usb-hdc">
            <ip>127.0.0.1</ip>
            <port>8710</port>
            <sn>xxx</sn>
        </device>
    </environment>

sn通过hdc_std list targets命令获取, hdc_std是连接设备的调试工具,可以在https://gitee.com/openharmony/developtools_hdc_standard仓获取,需要将这个工具加入环境变量。
另外,我们这块文档有一些欠缺,最近会补齐。

修改之后,还是一样的错误。 user_config.xml中配置如下:

<user_config>
    <environment>
        <support_device>
            <device>true</device>
        </support_device>
        <device type="usb-hdc">
            <ip>127.0.0.1</ip>
            <port>8710</port>
			<sn>d601004d4d43384742516c88046b18c9</sn>
        </device>
    </environment>
    <testcases>
        <dir></dir>
    </testcases>
    <resource>
        <dir></dir>
    </resource>
</user_config>

hdc_std.exe名字没有改吧?

改了,之前调试HDC时,建议改成hdc.exe. 目前改成hdc_std.exe了,正在跑测试。 感觉跑完一遍要很久? 另外有资料说明如何修改测试用例吗? 我这边想修改测试用例来测试wifi稳定性。

建议将此issue关闭,wifi稳定性测试问题再提一个issue,会有相关人员答复您的。

好的 谢谢

我这边无法关闭,麻烦你关闭该issue。

舒雄 任务状态进行中 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
C++
1
https://gitee.com/openharmony/xts_acts.git
git@gitee.com:openharmony/xts_acts.git
openharmony
xts_acts
xts_acts

搜索帮助

53164aa7 5694891 3bd8fe86 5694891