报错详细日志如下
test_pro_resemblance_product=========
INFO 2023-05-06 20:18:35,825 basenative.py wrapper 23 call BaseNative.get_start_up
INFO 2023-05-06 20:18:35,825 basenative.py wrapper 27 call BaseNative.get_start_up end
ERROR 2023-05-06 20:18:35,827 assertbase.py _teardown_collect 273 <bound method rerun.<locals>.wrapper.<locals>.decorator of <test_cases.test_product_details.ProductDetailsTest testMethod=test_pro_resemblance_product>>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/minium/utils/utils.py", line 432, in get_result
return fut.result(timeout)
File "/usr/local/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py", line 460, in result
raise TimeoutError()
concurrent.futures._base.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/minium/framework/libs/unittest/case.py", line 39, in testPartExecutor
yield
File "/usr/local/lib/python3.10/site-packages/minium/framework/libs/unittest/case.py", line 125, in run
self._callTestMethod(testMethod)
File "/usr/local/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
method()
File "/usr/local/lib/python3.10/site-packages/unittestreport/core/reRun.py", line 41, in decorator
run_count(count, interval, func, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/unittestreport/core/reRun.py", line 23, in run_count
raise e
File "/usr/local/lib/python3.10/site-packages/unittestreport/core/reRun.py", line 18, in run_count
func(*args, **kwargs)
File "/Users/tester/.jenkins/workspace/UI_mini_pro/test_cases/test_product_details.py", line 50, in test_pro_resemblance_product
self.execute_case(path)
File "/Users/tester/.jenkins/workspace/UI_mini_pro/base/base_operate.py", line 22, in execute_case
self.app.go_home()
File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/minium_log.py", line 131, in wrapper
result = func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/app.py", line 482, in go_home
page = self.relaunch(main_page_path)
File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/minium_log.py", line 131, in wrapper
result = func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/app.py", line 388, in relaunch
page = self._change_route_async("reLaunch", url, is_wait_url_change)
File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/app.py", line 564, in _change_route_async
if get_result(wait_route_changed, 15): # 接口调用成功后15s内应有on app route done
File "/usr/local/lib/python3.10/site-packages/minium/utils/utils.py", line 436, in get_result
raise WaitTimeoutError() from ext
minium.utils.utils.WaitTimeoutError
执行用例时,页面跳转成功没?或者没跳转完就继续执行了。看一下用例,在跳转页面后建议适当延时下再继续下一步
楼主有解决问题吗?遇到了类似的问题
看操作截图是页面没跳转成功(截图是空白页),全部用例一起跑的时候最后几条用例经常失败且都是这个报错,单独跑这条用例又没有问题
https://minitest.weixin.qq.com/#/minium/Python/api/App?id=wait_for_page