> 文档中心 > 开源鸿蒙XTS兼容性测试指导

开源鸿蒙XTS兼容性测试指导

一、参考文档
    https://www.openharmony.cn/certification/document/guid
    https://developer.huawei.com/consumer/cn/forum/topic/0204872172395610525

二、windows下python安装
    安装python,要求是3.7以上,可以安装3.7.9,安装3.11.1这个版本会有问题
    安装pip install setuptools
    安装pip install pyserial
    安装pip install rsa

三、windows环境配置
3.1、编译拷贝测试套件到windows
    编译dcts、hats、acts测试套件
    3.1.1、全量编译 test/xts/acts目录下执行编译命令: ./build.sh product_name=rk3568 system_size=standard
    3.1.2、全量编译 test/xts/hats目录下执行编译命令: ./build.sh product_name=rk3568 system_size=standard
    3.1.3、全量编译 test/xts/dcts目录下执行编译命令: ./build.sh suite=dcts system_size=standard

    拷贝xts测试套件out/rk3568/suites/dcts/到windows目录
    
3.2、拷贝对应的resource到测试套件下
    从“https://gitee.com/openharmony-sig/compatibility/tree/master/test_suite/resource ”选择对应分支与系统类型下载resource文件,拷贝到dcts\resource目录下

四、拷贝安装xdevice及xdevice_extension到测试套件的tool是目录下
    拷贝test/xdevice目录到window目录下,进入到xdevice目录下 python setup.py install
    拷贝xdevice/dist/xdevice-0.0.0-py3.7.egg文件到acts/tools、dcts/tools、hats/tools目录
    进入xdevice/extension,运行python setup.py install,生成dist目录,拷贝dist目录下的xdevice_extension.egg到acts/tools、dcts/tools、hats/tools

五、运行测试套件下的run.bat开始测试
    全量测试
    run acts
    run dcts
    run hats
    
    模块测试:
    run -l 模块名

六、编译遇到错误
    可暂时在build.gn中去掉错误的组件,后续解决错误