- 【minium】1. 报告里无运行日志 2. 多账号为什么时而好使时而不好使?
版本:1.5.5 suite.json { "pkg_list": [ { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.*" } ] } config.json [ { "project_path": "D:\\Project\\sopei-other\\weapp_u_sopei_cn", "dev_tool_path": "D:\\Software\\微信web开发者工具\\cli.bat", "debug_mode": "info", "outputs": ".\\output\\wx_u_report\\report_data", "platform": "ide", "app": "wx", "debug": true, "close_ide": false, "full_reset": true, "test_port": 9422, "assert_capture": true, "auto_relaunch": true, "auto_authorize": true, "enable_app_log": false, "use_push": false, "account_info": { "openid": "xxx", "nickName": "xxx" } }, { "project_path": "D:\\Project\\sopei-other\\weapp_u_sopei_cn", "dev_tool_path": "D:\\Software\\微信web开发者工具\\cli.bat", "debug_mode": "info", "outputs": ".\\output\\wx_u_report\\report_data", "platform": "ide", "app": "wx", "debug": true, "close_ide": false, "full_reset": true, "test_port": 9423, "assert_capture": true, "auto_relaunch": true, "auto_authorize": true, "enable_app_log": false, "use_push": false, "account_info": { "openid": "xxx", "nickName": "xxx" } } ] 1. 报告里无运行日志 loader下是有日志的 [图片] [图片] 2. 多账号运行模式下为什么还是串行跑case? 假设我跑两个case,然后配置了多个账户,但是跑case时依旧是一个一个跑 【第二个问题解决了】 3. 多账号运行为啥在parallel模式下不好使呢?我希望几个账户分批运行case,但是parallel模式运行的效果是串行,而不加--mode parallel是所有账号同时跑一个case??? 【这个问题也解决了,文档中说每个账号从队列中取一个pkg运行,是指从pkg_list下选一个,所以我每个case都得单独写在一个文件里???】 { "pkg_list": [ { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.test_adapt_data_project" }, { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.test_adapt_data_project2" }, { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.test_adapt_data_project3" } ] } 4.多账户为什么时而好使时而不好使???明明日志都打出来了 ==========Scan Cases from suite=========== └─ cases.wx.weapp_u_sopei_project.test_adapt_data_project │ ├─ TestDataAssert.test_weapp_u_adapt_lsc1 └─ cases.wx.weapp_u_sopei_project.test_adapt_data_project2 │ ├─ TestDataAssert2.test_weapp_u_adapt_lsc2 └─ cases.wx.weapp_u_sopei_project.test_adapt_data_project3 │ ├─ TestDataAssert3.test_weapp_u_adapt_lsc3 [I 2024-07-02 10:22:14 minium loader#646 main] load 3 cases [I 2024-07-02 10:22:14 minium loader#647 main] import package 【cases.wx.weapp_u_sopei_project.test_adapt_data_project2,cases.wx.weapp_u_sopei_project.test_adapt_data_project3,cases.wx.weapp_u_sopei_project.test_adapt_data_project】 success, import package 【】 fail 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:659" -main-[print]- after load config/wx_u_sopei_project/suite.json 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:660" -main-[print]- g_case_list size: 3 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:662" -main-[print]- test_weapp_u_adapt_lsc1 (cases.wx.weapp_u_sopei_project.test_adapt_data_project.TestDataAssert) 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:662" -main-[print]- test_weapp_u_adapt_lsc2 (cases.wx.weapp_u_sopei_project.test_adapt_data_project2.TestDataAssert2) 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:662" -main-[print]- test_weapp_u_adapt_lsc3 (cases.wx.weapp_u_sopei_project.test_adapt_data_project3.TestDataAssert3) 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:673" -main-[print]- {'version': '1.5.5', 'revision': 'dcf6f3345021813b36f0d1b3002746ebf0ec334b', 'branch': 'master', 'update_at': '2024-06-04 11:56:11'} [I 2024-07-02 10:22:14 minium loader#299 run_session] start session with parallel mode {'debug': True, 'base_dir': 'D:\\Project\\sopei-other\\other\\TestAutomation\\config\\wx_u_sopei_project', 'platform': 'ide', 'app': 'wx', 'debug_mode': 'info', 'close_ide': False, 'auto_capture': 'auto', 'check_mp_foreground': True, 'auto_relaunch': True, 'device_desire': {}, 'account_info': {'openid': 'o6zAJsz5tL2WOSML-li4x4OT_oRg', 'nickName': '17167851889'}, 'report_usage': True, 'remote_connect_timeout': 180, 'request_timeout': 60, 'use_push': False, 'full_reset': False, 'outputs': '.\\output\\wx_u_report\\report_data', 'enable_app_log': False, 'enable_network_panel': False, 'project_path': 'D:\\Project\\sopei-other\\weapp_u_sopei_cn', 'dev_tool_path': 'D:\\Software\\微信web开发者工具\\cli.bat', 'test_port': 9421, 'mock_native_modal': {}, 'mock_request': [], 'auto_authorize': True, 'audits': None, 'teardown_snapshot': False, 'mock_images_dir': '', 'mock_images': {}, 'need_perf': False, 'appid': None, 'enable_h5': True, 'assert_capture': True, 'framework_capture': True, 'error_capture': False, 'create_time': '20240702102214'} [I 2024-07-02 10:22:14 minium loader#299 run_session] start session with parallel mode {'debug': True, 'base_dir': 'D:\\Project\\sopei-other\\other\\TestAutomation\\config\\wx_u_sopei_project', 'platform': 'ide', 'app': 'wx', 'debug_mode': 'info', 'close_ide': False, 'auto_capture': 'auto', 'check_mp_foreground': True, 'auto_relaunch': True, 'device_desire': {}, 'account_info': {'openid': 'o6zAJs3IX0J0FkkGbyVPdIO-qJfI', 'nickName': '17167851887'}, 'report_usage': True, 'remote_connect_timeout': 180, 'request_timeout': 60, 'use_push': False, 'full_reset': False, 'outputs': '.\\output\\wx_u_report\\report_data', 'enable_app_log': False, 'enable_network_panel': False, 'project_path': 'D:\\Project\\sopei-other\\weapp_u_sopei_cn', 'dev_tool_path': 'D:\\Software\\微信web开发者工具\\cli.bat', 'test_port': 9422, 'mock_native_modal': {}, 'mock_request': [], 'auto_authorize': True, 'audits': None, 'teardown_snapshot': False, 'mock_images_dir': '', 'mock_images': {}, 'need_perf': False, 'appid': None, 'enable_h5': True, 'assert_capture': True, 'framework_capture': True, 'error_capture': False} [I 2024-07-02 10:22:15 minium minitest#200 init_miniprogram] start init miniprogram [I 2024-07-02 10:22:15 minium basenative#59 wrapper] call IdeNative.start_wechat [I 2024-07-02 10:22:15 minium basenative#63 wrapper] call IdeNative.start_wechat end None [I 2024-07-02 10:22:15 minium wx_minium#680 launch_dev_tool] Starting dev tool and launch MiniProgram project ... [I 2024-07-02 10:22:15 minium minium_object#83 _do_shell] de shell: cli.bat auto --project "D:\Project\sopei-other\weapp_u_sopei_cn" --auto-port 9421 [I 2024-07-02 10:22:16 minium minitest#200 init_miniprogram] start init miniprogram [I 2024-07-02 10:22:16 minium basenative#59 wrapper] call IdeNative.start_wechat [I 2024-07-02 10:22:16 minium basenative#63 wrapper] call IdeNative.start_wechat end None [I 2024-07-02 10:22:16 minium wx_minium#680 launch_dev_tool] Starting dev tool and launch MiniProgram project ... [I 2024-07-02 10:22:16 minium minium_object#83 _do_shell] de shell: cli.bat auto --project "D:\Project\sopei-other\weapp_u_sopei_cn" --auto-port 9422 [I 2024-07-02 10:22:20 minium minium_object#101 _do_shell] err: - initialize × IDE may already started at port 64672, trying to connect × #initialize-error: wait IDE port timeout [I 2024-07-02 10:22:46 minium minium_object#102 _do_shell] out: [I 2024-07-02 10:22:56 minium wx_minium#777 connect_dev_tool] Trying to connect Dev tool ... [E 2024-07-02 10:23:00 minium.Conn4528 connection#632 _on_error] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:00 minium.Conn4528 connection#367 _ws_run_forever] websocket run forever shutdown [E 2024-07-02 10:23:00 minium wx_minium#789 connect_dev_tool] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 Traceback (most recent call last): File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\wx_minium.py", line 778, in connect_dev_tool self.connection = Connection.create( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 169, in create instance = cls(uri, *args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 209, in __init__ self._connect() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 351, in _connect raise error_callback.result File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_app.py", line 327, in run_forever self.sock.connect( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_core.py", line 244, in connect self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options), File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 130, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 205, in _open_socket raise err File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 185, in _open_socket sock.connect(address) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:00 minium wx_minium#777 connect_dev_tool] Trying to connect Dev tool ... [E 2024-07-02 10:23:05 minium.Conn6976 connection#632 _on_error] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:05 minium.Conn6976 connection#367 _ws_run_forever] websocket run forever shutdown [E 2024-07-02 10:23:05 minium wx_minium#789 connect_dev_tool] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 Traceback (most recent call last): File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\wx_minium.py", line 778, in connect_dev_tool self.connection = Connection.create( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 169, in create instance = cls(uri, *args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 209, in __init__ self._connect() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 351, in _connect raise error_callback.result File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_app.py", line 327, in run_forever self.sock.connect( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_core.py", line 244, in connect self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options), File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 130, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 205, in _open_socket raise err File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 185, in _open_socket sock.connect(address) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:05 minium wx_minium#777 connect_dev_tool] Trying to connect Dev tool ... [E 2024-07-02 10:23:09 minium.Conn8512 connection#632 _on_error] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:09 minium.Conn8512 connection#367 _ws_run_forever] websocket run forever shutdown [E 2024-07-02 10:23:09 minium wx_minium#789 connect_dev_tool] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 Traceback (most recent call last): File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\wx_minium.py", line 778, in connect_dev_tool self.connection = Connection.create( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 169, in create instance = cls(uri, *args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 209, in __init__ self._connect() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 351, in _connect raise error_callback.result File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_app.py", line 327, in run_forever self.sock.connect( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_core.py", line 244, in connect self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options), File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 130, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 205, in _open_socket raise err File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 185, in _open_socket sock.connect(address) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [E 2024-07-02 10:23:09 minium wx_minium#739 launch_dev_tool] three times try to connect Dev tool has all fail ..., restart now... [I 2024-07-02 10:23:09 minium wx_minium#753 launch_dev_tool] Starting dev tool again... [I 2024-07-02 10:23:09 minium minium_object#83 _do_shell] de shell: cli.bat auto --project "D:\Project\sopei-other\weapp_u_sopei_cn" --auto-port 9422 [E 2024-07-02 10:23:12 minium.Conn5536 connection#632 _on_error] [WinError 10054] 远程主机强迫关闭了一个现有的连接。 [I 2024-07-02 10:23:12 minium.Conn5536 connection#367 _ws_run_forever] websocket run forever shutdown [W 2024-07-02 10:23:12 minium.Conn5536 connection#552 reconnect] connection reconnect [I 2024-07-02 10:23:12 minium minium_object#101 _do_shell] err: - initialize √ IDE server has started, listening on http://127.0.0.1:14150 - preparing - Fetching AppID (wxc32a18a73224dc73) permissions √ Using AppID: wxc32a18a73224dc73 √ auto
07-01 - 【minium】可以支持无头模式运行吗?
或者是有其他可以弥补case运行时卡顿的方案吗?
06-27 - 【minium】如果以unitest的方式运行,该如何配置并行运行case?(parallel)
如果以unitest的方式运行【比如unitest.main】,该如何配置并行运行case? 实现类似minitest命令行的--mode parallel
06-25 - minium在执行完20多个CASE后开始出现page destroyed,元素not found?
在执行完20多Case之后开始出现page destroyed,然后后续的Case也无法正常获取元素 可以确认的是小程序源代码本身在测试期间没有任何改动 [E 2024-01-18 18:46:23,428 minium.Conn8160 connection#657 __on_message] [5b345e7d-424b-4bc6-b1f2-dad416199a88]: page destroyed [E 2024-01-18 18:46:23,694 minium.Conn8160 connection#657 __on_message] [f953fc68-2cd9-4750-acbf-acaa4ad8588f]: page destroyed [E 2024-01-18 18:46:23,954 minium.Conn8160 connection#657 __on_message] [2f518df0-d5d3-427b-8ec0-04cc236eb598]: page destroyed [E 2024-01-18 18:46:24,221 minium.Conn8160 connection#657 __on_message] [42384ff6-17b3-4466-b1b2-a26f042891dd]: page destroyed [E 2024-01-18 18:46:24,483 minium.Conn8160 connection#657 __on_message] [913b325a-f29d-4e88-8ece-5718a53d5c42]: page destroyed [E 2024-01-18 18:46:24,748 minium.Conn8160 connection#657 __on_message] [6127e0d3-ebb2-48c2-9efe-83e4a9946a43]: page destroyed [E 2024-01-18 18:46:25,015 minium.Conn8160 connection#657 __on_message] [de9e6ba0-4668-44f2-9917-4a747a13d223]: page destroyed [E 2024-01-18 18:46:25,277 minium.Conn8160 connection#657 __on_message] [d2a1c5b3-205b-4dd7-9ebc-458b346102f6]: page destroyed [E 2024-01-18 18:46:25,540 minium.Conn8160 connection#657 __on_message] [6560d4f0-d4d7-49e5-b18c-e39e70362b36]: page destroyed [E 2024-01-18 18:46:25,806 minium.Conn8160 connection#657 __on_message] [46ea5a8e-42a3-4c42-96e9-2bc94d320492]: page destroyed [E 2024-01-18 18:46:26,070 minium.Conn8160 connection#657 __on_message] [a088849d-bca9-41e8-8220-6a37ea8fc84c]: page destroyed [E 2024-01-18 18:46:26,334 minium.Conn8160 connection#657 __on_message] [72801f16-0271-4504-b93f-e8b3a82f37d4]: page destroyed [E 2024-01-18 18:46:26,597 minium basedef#134 tap] 找不到该元素//text[contains(@class,'iconfont sp_weapp_iconguanbi1')],无法点击!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [E 2024-01-18 18:46:26,600 minium.Conn8160 connection#657 __on_message] [9ea3ddbe-df11-4d89-860c-20a31b48ea5f]: page destroyed [E 2024-01-18 18:46:26,861 minium.Conn8160 connection#657 __on_message] [47390b46-0057-4580-a8d4-be5de56b622e]: page destroyed [E 2024-01-18 18:46:27,124 minium.Conn8160 connection#657 __on_message] [9c6688a1-a93f-4aee-b148-c27a7ad84288]: page destroyed [E 2024-01-18 18:46:27,390 minium.Conn8160 connection#657 __on_message] [172bf0b2-1eb0-4076-8e5c-f2f5298d23e9]: page destroyed [E 2024-01-18 18:46:27,649 minium.Conn8160 connection#657 __on_message] [e8891d09-6047-42f6-8354-b84ca16d7f1e]: page destroyed [E 2024-01-18 18:46:27,917 minium.Conn8160 connection#657 __on_message] [a4cb36a1-e78a-4aac-8e94-49e76765241f]: page destroyed [E 2024-01-18 18:46:28,180 minium.Conn8160 connection#657 __on_message] [7b2d825e-15a3-4879-a00c-5aecf09d97b9]: page destroyed [E 2024-01-18 18:46:28,436 minium.Conn8160 connection#657 __on_message] [91ee9842-a28e-4d9c-b449-c89609f87a51]: page destroyed [E 2024-01-18 18:46:28,704 minium.Conn8160 connection#657 __on_message] [bc4aad24-1d69-4a5b-b6ae-6523f27b52ed]: page destroyed [E 2024-01-18 18:46:28,966 minium.Conn8160 connection#657 __on_message] [80bfcb3f-f084-4700-9dc7-6d559c6832af]: page destroyed [E 2024-01-18 18:46:29,235 minium.Conn8160 connection#657 __on_message] [1598b8a8-c22b-4552-bafc-00f6519e0b6a]: page destroyed
01-19 - minium针对于自定义元素的获取,如果上一级能获取到多个元素,下一级该咋写?
代码如下: # self.get_element("content-loading >>> part-item") 这里能取到5条元素, # 当想获取part-item下text[text() ='0do15b']的元素时就会报找不到当前元素的错误 # 因为text() ='0do15b'在第3个part-item元素下,而self.get_element("content-loading >>> part-item")默认取第一个 ```python self.get_element("content-loading >>> part-item").get_element("text", innert_text"0do15b") ```
01-18 - minium展示的teardown和setup图片不正确?
minium展示的teardown和setup图片不正确
01-17 - 发现使用xpath寻找元素的失败率极高(可能10回有5回找不到元素),这是为什么?
如下图,使用"//text[text()='0c2hxx']"有的时候会找不到元素\ [图片] 补充代码: def element_is_exists(self, element, max_timeout=15): self.mini.logger.info(f"目前在断言元素{element}") for i in range(3): ele = self.page.wait_for(element, max_timeout=max_timeout) if ele: return self.page.element_is_exists(element, max_timeout=max_timeout) self.app.logger.error(f"找不到该元素{element},超过重试次数") return False
01-17 - minium生成报告越来越多,怎样进行清理?
我们目前在本地搭建的自动化测试程序生成的minium报告越来越多,请问怎样进行清理? (想通过删除loaderxx.log和对应文件夹来达到目的,但发现左侧日期数据是写死在meta.json里的) 不知道可否以配置通配符的方式来配置`outputs`字段,如 { ... "outputs": "C:\\Automation_test\\Outputs\\yyyy-MM-dd", ... } [图片]
01-16 - minium生成报告越来越多,怎样进行清理?
我们目前在本地搭建的自动化测试程序生成的minium报告越来越多,请问怎样进行清理? (想通过删除loaderxx.log和对应文件夹来达到目的,但发现左侧日期数据是写死在meta.json里的) 不知道可否以配置通配符的方式来配置`outputs`字段,如 { ... "outputs": "C:\\Automation_test\\Outputs\\yyyy-MM-dd", ... } [图片]
01-09 - minium.framework.exception.MiniCommandError?
错误日志:====================case num:1, failed num:0, error num:1==================== FirstTest:test_get_system_info has error: Traceback (most recent call last): File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\libs\unittest\case.py", line 265, in testPartExecutor yield File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\libs\unittest\case.py", line 341, in run self._miniSetUp() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\minitest.py", line 416, in _miniSetUp self.app.go_home() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\minium_log.py", line 172, in wrapper result = func(*args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\app.py", line 838, in go_home page = self.switch_tab( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\minium_log.py", line 172, in wrapper result = func(*args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\utils\utils.py", line 82, in wrapper ret = func(*args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\app.py", line 767, in switch_tab page = self._change_route_async( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\app.py", line 934, in _change_route_async cmd.get_open_result(wait_timeout) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\app.py", line 128, in get_open_result return self._open_callback.get_result() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\callback.py", line 152, in get_result return self._waiter.result() minium.framework.exception.MiniCommandError: timeout 开发工具初始化成功,但是紧接着就出现这个错误 代码就是minum官网中的demo示例 可以肯定的是minium测试代码没问题,我换了个小程序项目就好使了,但是这个换回来就报错timeout
2023-11-10