musen123 / unittestreport Goto Github PK
View Code? Open in Web Editor NEWpython的Unittest框架扩展库、提供生成HTML测试报告、用例失败重运行、数据驱动、邮件发送测试结果等功能!
License: MIT License
python的Unittest框架扩展库、提供生成HTML测试报告、用例失败重运行、数据驱动、邮件发送测试结果等功能!
License: MIT License
template2 生成的报告中, 本次运行详情下面的表格,执行结果右边的下拉列表中
失败和错误字体颜色反了,其它地方失败是黄色,错误是红色
环境信息如下:
Mac:10.14.6
python:3.8
pycharm:2019.3
unittestreport:1.3.2
将数据从Excel读出后 进行json处理亦或者直接使用ddt或者list_data均无法正常显示title字段的内容,使用代码内的文档注释可正常显示;请协助排查。谢谢
httprunner 3.1.4 requires jinja2<3.0.0,>=2.10.3, but you have jinja2 2.10.1 which is incompatible.
unittestreport 1.1.10 requires Jinja2==2.10.1, but you have jinja2 2.11.3 which is incompatible.
请教一下发送邮件如果想要抄送的话需要怎么设置,[aaa,Cc:bbb]。这样写不行
环境场景:windows,unittest执行时是utf-8编码,测试生僻字需求。
报错:File "D:\Programs\Python\Python310\lib\site-packages\unittestreport\core\testResult.py", line 35, in write
origin_stdout.write(str(s))
UnicodeEncodeError: 'gbk' codec can't encode character '\u9ff7' in position 865: illegal multibyte sequence
分析:origin_stdout.write(str(s))会使用默认windows的gbk编码
解决:尝试使用网上的编码设置方式来修改python模块中的源码,会产生其他乱码问题,后来直接删除此行得到解决
在看测试报告详细信息为空,需要添加什么标志吗
开启多线程后,request的打印内容都不一样了,开始请求前和请求后的不一样
安装的时候版本兼容问题,从安装第一步,陆续安装,陆续出现问题
(1)
pip3 install unittestreport ==1.5.1
unittestreport 1.5.1 requires requests==2.24.0
(2)
pip3 install urllib3 ==1.26.1
selenium 4.5.0 requires urllib3[socks]~=1.26
(3)
pip3 install requests ==2.24.0
requests 2.24.0 requires urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
(4)
pip3 install requests==2.24.0
selenium 4.5.0 requires urllib3[socks]~=1.26
本来想着,我降级selenium版本,后面发现appium那块又不兼容了,
建议将unittestreport的request兼容版本升级到2.28.1
Jinja2==3.0.3
PyYAML==5.3.1
requests==2.24.0
Markdown==2.3.1
Jinja2>=3.0.3
PyYAML>=5.3.1
requests>=2.24.0
Markdown>=2.3.1
用例运行时长超过100S时,html报告中显示为科学计数法
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.