HttpRunnerManager运行用例,报告无数据展示

博客描述了在使用HttpRunnerManager时遇到的报告数据无法显示的问题,具体表现为SyntaxError和ReferenceError。作者通过调试发现是前端和后端代码版本不兼容,特别是PyYAML和HttpRunner的版本。解决方案是安装符合要求的版本。
摘要由CSDN通过智能技术生成

1. 现象

报告无数据
在这里插入图片描述
页面报错
在这里插入图片描述
Uncaught SyntaxError: Unexpected token ‘,’
在这里插入图片描述
Uncaught ReferenceError: statusGroup is not defined
at drawParentChart (extent.js:458)
at extent.js:469
在这里插入图片描述

2. 原因

找到html文件
在这里插入图片描述
第一个报错说明stat.successes取值有问题
第二个报错应该是第一个报错没取到值引起的

3.溯源

运行项目debug
获取到运行到这一步的_summary值,上面报告所取的值都是从里面解析出来的

{
   
	'success': True, 
	'stat': 
		{
   
			'testcases': 
				{
   
					'total': 1, 'success': 1, 'fail': 0
				}, 
			'teststeps': 
				{
   
					'total': 1, 'failures': 0, 'errors': 0, 'skipped': 0, 'expectedFailures': 0, 'unexpectedSuccesses': 0, 'successes': 1
				}
		}, 
	'time': 
		{
   
			'start_at': 1570339928.667485, 
			'duration': 18.493363857269287, 
			'start_datetime': '2019-10-06 13:32:08'
		},
	'platform': 
		{
   
			'httprunner_version': '2.2.6', 'python_version': 'CPython 3.6.3', 'platform': 'Darwin-16.7.0-x86_64-i386-64bit'
		},
	'details': 
		[
	 		{
   
	 			'success': True, 
	 			'stat': 
	 				{
   
	 					'total': 1, 'failures': 0, 'errors': 0, 'skipped': 0, 'expectedFailures': 0, 'unexpectedSuccesses': 0, 'successes': 1
	 				}, 
	 		
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值