Skip to content

Commit

Permalink
增加失败重试功能
Browse files Browse the repository at this point in the history
  • Loading branch information
liwanlei committed Sep 4, 2018
1 parent 5aa647d commit 9eb9402
Show file tree
Hide file tree
Showing 15 changed files with 470 additions and 1,008 deletions.
12 changes: 1 addition & 11 deletions Public/get_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,4 @@ def datacel(filrpath):
return listid,listkey,listconeent,listurl,listfangshi,listqiwang,listname
except Exception as e:
LOG.info('打开测试用例失败,原因是:%s'%e)
return
@logger('生成数据驱动所用数据')
def makedata():
import os
path = os.getcwd() + '\\test_case\\case.xlsx'
listid, listkey, listconeent, listurl, listfangshi, listqiwang, listname=datacel(path)
make_data=[]
for i in range(len(listid)):
make_data.append({'url':listurl[i],'key':listkey[i],'coneent':listconeent[i],'fangshi':listfangshi[i],'qiwang':listqiwang[i]})
i+=1
return make_data
return
102 changes: 0 additions & 102 deletions Public/pyreport_excel.py

This file was deleted.

13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# 接口测试框架(基于json格式、http协议,dubbo协议请求,python3,不兼容python2.x版本)
##  java实现版本:https://github.com/liwanlei/java_jiekou
## 注:现在基于Excel文件管理测试用例基本实现,)

# 2018-9-14版本修改
### 1.失败用例重试功能,失败用例可以重试,重试次数可配置
### 2.去掉重复的功能
### 3.基础url可以在config配置,只需要写api

# 2018-3-13版本修改
### 原来的测试报告更加详细的展示错误类型,对部分代码进行了优化,断言结果返回更加详细,更快的定位测试问题

## (目前在部分window上会出现FileNotFoundError [Errno 2] No such file or directory,这个bug是路径过长,解决方案为吧log日志放在当前目录,或者修改动态生成的文件的名字,给了第一种方式,测试日志放在当前目录)
## qq交流群:194704520  一群 683894834 二群
### 使用的库 requests,绝大部分是基于Python原有的库进行的,这样简单方便,
# 友情推荐本人其他开源代码:
# 1.python接口测试平台版本!(https://github.com/liwanlei/FXTest)
# 2.python app自动化测试平台版本:(https://github.com/liwanlei/UFATestPlan)
# 3.python+flask 做后台,实现微信小程序:(https://github.com/liwanlei/webchat_app)
# 1.python接口测试平台版本!https://github.com/liwanlei/FXTest
# 2.python app自动化测试平台版本:https://github.com/liwanlei/UFATestPlan
# 3.python+flask 做后台,实现微信小程序:https://github.com/liwanlei/webchat_app
### 使用脚本参数分离等思想,尽可能降低代码的耦合度。
# 2017-11-1版本修改
## 引入ddt数据驱动和BSTestRunner,并且测试过程使用python的unittest库,运行可以使用run_new来运行测试,新的运行更加简单,对预期结果进行了自定义,
Expand Down
6 changes: 3 additions & 3 deletions config/config_T.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
@file: config_T.py
@time: 2018/4/12 14:17
"""
Dingtalk_access_token=""
TestPlanUrl=''
Config_Try_Num=3
Dingtalk_access_token="" #钉钉配置
TestPlanUrl='http://www.tuling123.com' #基础url
Config_Try_Num=3#失败重试
7 changes: 0 additions & 7 deletions config/test_report.yaml

This file was deleted.

Loading

0 comments on commit 9eb9402

Please sign in to comment.