Coder Social home page Coder Social logo

musen123 / unittestreport Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 14.0 7.46 MB

python的Unittest框架扩展库、提供生成HTML测试报告、用例失败重运行、数据驱动、邮件发送测试结果等功能!

License: MIT License

Python 17.48% HTML 82.52%
python unittest

unittestreport's Issues

unittestreport的用例描述不能正常显示

环境信息如下:
Mac:10.14.6
python:3.8
pycharm:2019.3
unittestreport:1.3.2

将数据从Excel读出后 进行json处理亦或者直接使用ddt或者list_data均无法正常显示title字段的内容,使用代码内的文档注释可正常显示;请协助排查。谢谢

【已提供修复方案】在windows环境运行时,OutputRedirector的write方法中存在编码处理兼容问题

环境场景: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模块中的源码,会产生其他乱码问题,后来直接删除此行得到解决

selenium、appium、urllib、requests、unittestreport版本兼容问题

安装的时候版本兼容问题,从安装第一步,陆续安装,陆续出现问题
(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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.