[Minium]使用minium的miniruntest执行用例时报错?
发布于 8 年前 作者 xueming 9850 次浏览 来自 官方Issues

Windows系统

  1. 不使用suite配置文件直接执行命令miniruntest报错


    config.json配置文件如下

    {
    "debug_mode": "debug",
     "project_path": "C:\\Users\\Administrator\\test",
     "enable_app_log": true,
     "platform": "ide",
     "close_ide": false,
     "test_port": 9420,
     "no_assert_capture": false,
     "use_push": true,
     "dev_tool_path":"D:\\Program Files\\微信web开发者工具\\cli.bat",
     "remote_connect_timeout": 180,
     "device_desire":{}
    }


2.使用suite配置文件执行miniruntest报错

D:\code\MiniumDemo>miniruntest -s ./suite.json -g

Traceback (most recent call last):

  File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts\miniruntest-script.py”, line 11, in <module>

    load_entry_point(‘minium==0.0.2’, ‘console_scripts’, ‘miniruntest’)()

  File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\minium-0.0.2-py3.7.egg\minium\framework\loader.py”, line 100, in main

    tests=load_from_suite(path,suite_path)

  File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\minium-0.0.2-py3.7.egg\minium\framework\loader.py”, line 28, in load_from_suite

    module_case_info_list=case_inspect.load_module(case_path)

  File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\minium-0.0.2-py3.7.egg\minium\framework\case_inspect.py”, line 72, in load_module

    mod=import_module(module_name)

  File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\minium-0.0.2-py3.7.egg\minium\framework\case_inspect.py”, line 20, in import_module

    mod=__import__(module_name)

ModuleNotFoundError: No module named ‘venv.Lib’

4 回复

您好,能否贴一下demo的代码和suite.json?

请问是安装完minium才可以使用miniruntest吗?

suite.json

{
"pkg_list": [
{
"pkg": "TestSuite.*",
     "case_list": [
"test_air"
     ]
}
]
}

demo.py

import minium
import time

class FirstTest(minium.Minium,minium.MiniTest):

def test_air(self):
miniprogram = self.app #获取小程序实例
     miniprogram.go_home()
回到顶部