jianbing / utx

对Python unittest的功能进行了扩展(用例排序,分组,数据驱动,可视化报告等)
MIT License
145 stars 59 forks source link

I got this error : ZeroDivisionError: division by zero , so that the report can't create #7

Open 1451297455 opened 5 years ago

1451297455 commented 5 years ago

2019-07-08 17:12:12,761 INFO 开始测试,用例数量总共3个,跳过0个,实际运行3个 2019-07-08 17:12:12,761 INFO Time Elapsed: 0:00:00.000198 Traceback (most recent call last): File "/Users/user/app/interface/test-interfaces.git/WORK/AVN_Test/Sample.py", line 84, in runner.run_test(report_title='接口自动化测试报告') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/utx-0.0.7-py3.7.egg/utx/runner.py", line 222, in run_test File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/utx-0.0.7-py3.7.egg/utx/runner.py", line 118, in run File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/utx-0.0.7-py3.7.egg/utx/report/style_1.py", line 377, in build_report ZeroDivisionError: division by zero

Process finished with exit code 1

TestSmallWhite commented 4 years ago

你的测试用例是不是没有“test_xxx”开头?如果没有test开头,unittest是会跳过的,跳过后就是0执行了