testerliferaymond / beautifulreport Goto Github PK
View Code? Open in Web Editor NEW适用于unittest自动化测试的可视化报告
License: MIT License
适用于unittest自动化测试的可视化报告
License: MIT License
代码水平有限,请帮小白一个忙。
我修改了template里的中文,因为我们的report是给洋人看的,但是我修改了所有template的中文再次生成报告,为什么还是中文?
self.assertEqual(input_Page.get_title(), Daima_title)
我尝试了断言,但报告中没有打印内容。
想问,如何写断言才能让断言结果内容显示在报告中
请问怎么解决。
python:3.4.4
widows 10.
Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
from BeautifulReport import BeautifulReport as bf
Traceback (most recent call last):
File "", line 1, in
File "C:\Python34\lib\site-packages\BeautifulReport_init_.py", line 8, in
from .BeautifulReport import BeautifulReport
File "C:\Python34\lib\site-packages\BeautifulReport\BeautifulReport.py", line 398
**json.load(theme),
^
SyntaxError: invalid syntax
使用定时器触发测试任务,报告汇总没有继承,但是详细测试结果继承了上一次的结果
主要报错信息:
File "G:\BeautifulReport\BeautifulReport.py", line 189, in complete_output
return self.outputBuffer.getvalue()
AttributeError: 'NoneType' object has no attribute 'getvalue'
即:
if self.sys_stdout:
sys.stdout = self.sys_stdout
sys.stderr = self.sys_stderr
self.sys_stdout = None
self.sys_stderr = None
return self.outputBuffer.getvalue()
self.sys_stdout为None,
self.outputBuffer也为None,请指教,谢谢!
小白一个,代码能力有限,请大神指点迷津
self.success_case_info = []
self.skipped_case_info = []
self.failures_case_info = []
这几个信息是没有处理加工的,无法进行二次处理
suite = unittest.TestSuite() # 建立测试集合
all_cases = unittest.defaultTestLoader.discover('./tests', 'test_*.py')
for case in all_cases:
run = BeautifulReport(case)
time.sleep(1)
run.report(filename="%s_report.html" % time.strftime('%Y%m%d%H%M%S'), description='自动化测试报告',log_path='./report')
我是这样写的,比如我tests目录下有两个测试类,这样虽然可以生成两个测试报告,但是,最后一个测试报告,还是会把两个类放在一个报告里面。
你好啊,请问这个是python3的才能用么
多线程运行多个测试用例,报告出现每个用例中print内容展示放置错误,没有按对应用例存放展示,且出现部分print内容 打印到控制台中
如题
大神 帮忙看下,为啥两次执行间隔较短的时候,第二次生成的报告里包含上次执行的结果
你好,我的测试用例是写入excel里面批量读取的,结果报告的用例描述为空,请问可以直接读取而不用‘’‘描述吗
I see for now , there is no email send and other ways to tell other to show it , I think it is a good feature
这个是driver配置
def hanless_chrome(self):
opt = Options()
opt.add_argument('--no-sandbox') # 解决DevToolsActivePort文件不存在的报错
opt.add_argument('window-size=1920x3000') # 指定浏览器分辨率
opt.add_argument('--disable-gpu') # 谷歌文档提到需要加上这个属性来规避bug
opt.add_argument('--hide-scrollbars') # 隐藏滚动条, 应对一些特殊页面
opt.add_argument('blink-settings=imagesEnabled=false') # 不加载图片, 提升速度
opt.add_argument('--headless')
driver = webdriver.Chrome(chrome_options=opt)
return driver
主文件BeautifulReport的189行outputBuffer这个值是个NoneType类型所以找不到getValue的方法
请指教
Here is the LINK
datas
is not a valid word and we should use data
definitely
try:
# 启动浏览器,访问首页
daima_Page.gotoP1()
# 输入名字
daima_Page.input_name_text()
#输入手机号
daima_Page.input_mobile_text()
#点选出生日期
daima_Page.click_date_choose()
daima_Page.click_birth_choose()
#点击马上贷款
daima_Page.click_loan_input()
except:
print("需手工验证地址:%s" % url)
实际情况:打开多个URL,输入内容。有的URL无法输入内容跳过执行后,打印出URL地址来。
想要实现:想要把打印出来的URL显示在报告内,我要如何实现呢?
用的是PO的设计方法吗 (page object)?
大佬,请指导,discover加载2个测试套,每个有3个测试case。
运行完,结果只有1个测试套执行。看上去应该是覆盖数据导致
如图,在做接口自动化时,用的
@classmethod,
def setUpClass(cls):
def test1
def test2
结合unittest框架
为什么生产的报告test2里面包含test1,test3包含test2,test1信息?
大佬能否帮忙支持下subtest,目前好像不太支持(或者是我不会用)
文件里有很多中文,但是没有在文件开头写# coding=utf-8, 会导致出错。
还有方法里行参datas:tuple, 会报错。
其他的方法里有很多-> str或者-> int或者->None这种形式的,也会报错
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Python35\Lib\site-packages/BeautifulReport/template/template'
这怎么搞,为什么总是报错这个
报告汇总:用例通过的数和用例跳过的数显示跟详细数据中的计数不一致;望大佬修复!!!
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.