liwanlei / jiekou-python3 Goto Github PK
View Code? Open in Web Editor NEW接口自动化测试框架——python版,支持HTTP,dubbo协议接口
接口自动化测试框架——python版,支持HTTP,dubbo协议接口
基于telnet的invoke不支持 List类型的参数,很头疼
xlrd不支持xlsx格式,建议增加openpyxl模块操作xlsx
这个问题怎么解决?有朋友遇到吗?
Traceback (most recent call last):
File "F:/pycharm_project/API/jiekou-python3-master/run_dubbo_html.py", line 31, in
start_dubbo_case()
File "F:/pycharm_project/API/jiekou-python3-master/run_dubbo_html.py", line 16, in start_dubbo_case
listrelust, list_fail, list_pass, list_json, list_exption, list_weizhi = testdubbointerface()
TypeError: cannot unpack non-iterable NoneType object
File "D:\jiekou-python3-master\Public\get_excel.py", line 38, in makedata
listid, listkey, listconeent, listurl, listfangshi, listqiwang, listname=datacel(path)
TypeError: cannot unpack non-iterable NoneType object
python run_new.py
[2020-06-23 17:35:29.135490] INFO: jiekou: 当前模块 requests封装
[2020-06-23 17:35:29.136489] INFO: jiekou: 全部args参数参数信息 , ()
[2020-06-23 17:35:29.136489] INFO: jiekou: 全部kwargs参数信息 , {}
Traceback (most recent call last):
File "run_new.py", line 3, in
from testCase.ddt_case import MyTest
File "E:\py_demo\jiekou-python3-master\testCase\ddt_case.py", line 2, in
from Public.get_excel import datacel, makedata
ImportError: cannot import name 'makedata' from 'Public.get_excel' (E:\py_demo\jiekou-python3-master\Public\get_excel.py)
testFengzhuang.py下,方式写了GET,请求用了POST,请确认?
23 elif self.fangshi=="GET":
24 self.parem = {'key': self.key, 'info': self.connent}
25 response = reques.post(self.url, self.parem)
这个问题有朋友遇到吗?怎么解决
Traceback (most recent call last):
File "F:/pycharm_project/API/jiekou-python3-master/run_html.py", line 38, in
tThread()
File "F:/pycharm_project/API/jiekou-python3-master/run_html.py", line 34, in tThread
m.run()
File "D:\python\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "F:/pycharm_project/API/jiekou-python3-master/run_html.py", line 19, in stast
listrelust, list_fail, list_pass, list_json = testinterface()
ValueError: too many values to unpack (expected 4)
每个run都运行过 无法生成邮件测试报告
建议还是把你email.yaml中的信息脱敏了吧,防人之心不可无。。
在下面截取的代码部分中,应该将断言通过出的‘continue’改成‘break’,不然的话,断言通过,case会一直不停的执行
for i in range(len(listurl)):
while error_num<=Config_Try_Num+1:
api = TestApi(url=TestPlanUrl+listurl[i], key=listkey[i], connent=listconeent[i], fangshi=listfangshi[i])
apijson = api.getJson()
if apijson['code'] == 0:
LOG.info('inputdata> 参数:%s, url:%s ,返回:%s,预期:%s' % (listconeent[i], listurl[i], apijson, listqiwang[i]))
assert_re = assert_in(asserqiwang=listqiwang[i], fanhuijson=apijson)
if assert_re['code'] == 0:
list_json.append(apijson['result'])
listrelust.append('pass')
list_pass += 1
error_num=0
continue
Traceback (most recent call last):
File "F:/pycharm_project/API/jiekou-python3-master/run_new.py", line 3, in
from testCase.ddt_case import MyTest
File "F:\pycharm_project\API\jiekou-python3-master\testCase\ddt_case.py", line 9, in
data_test = makedata()
File "F:\pycharm_project\API\jiekou-python3-master\Public\log.py", line 40, in _wrap
return function(*args, **kwargs)
TypeError: makedata() missing 1 required positional argument: 'filrpath'
请问下,服务怎么启动呢?
你好.Clone到本地后,python install所需库之后,python run_excel_re.py提示错误?
D:\workapp\python3\python.exe D:/jiekou-python3/run_excel_re.py
[2020-05-09 17:45:42.707797] INFO: jiekou: 当前模块 requests封装
[2020-05-09 17:45:42.708766] INFO: jiekou: 全部args参数参数信息 , ()
[2020-05-09 17:45:42.708766] INFO: jiekou: 全部kwargs参数信息 , {}
[2020-05-09 17:45:42.710759] INFO: jiekou: 当前模块 解析测试用例文件
[2020-05-09 17:45:42.710759] INFO: jiekou: 全部args参数参数信息 , ('D:\jiekou-python3\test_case_data\case.xlsx',)
[2020-05-09 17:45:42.710759] INFO: jiekou: 全部kwargs参数信息 , {}
[2020-05-09 17:45:42.731704] INFO: jiekou: 当前模块 解析测试用例文件
[2020-05-09 17:45:42.732701] INFO: jiekou: 全部args参数参数信息 , ()
[2020-05-09 17:45:42.732701] INFO: jiekou: 全部kwargs参数信息 , {}
Traceback (most recent call last):
File "D:/jiekou-python3/run_excel_re.py", line 32, in
teThread()
File "D:/jiekou-python3/run_excel_re.py", line 29, in teThread
m.run()
File "D:\workapp\python3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:/jiekou-python3/run_excel_re.py", line 17, in start
listid,listkey,listconeent,listurl,listfangshi,listqiwang,listname=datacel()
File "D:\jiekou-python3\Public\log.py", line 34, in _wrap
return function(*args, **kwargs)
TypeError: datacel() missing 1 required positional argument: 'filrpath'
你好,请问头部信息存储在测试用例的哪里呀
自己搭了一个环境,post请求,在参数中填写{“username":"test","password":"11111"},提交显示类型错误,希望大神可以回复下~
'touch' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
Traceback (most recent call last):
File "F:/pycharm_project/API/jiekou-python3-master/run_http_html.py", line 33, in
start_interface_html_http()
File "F:/pycharm_project/API/jiekou-python3-master/run_http_html.py", line 29, in start_interface_html_http
send_ding(content=contec)
File "F:\pycharm_project\API\jiekou-python3-master\Public\Dingtalk.py", line 18, in send_ding
f = requests.post(url, data=json.dumps(pagrem), headers=headers)
File "D:\python\lib\site-packages\requests\api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "D:\python\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "D:\python\lib\site-packages\requests\sessions.py", line 516, in request
prep = self.prepare_request(req)
File "D:\python\lib\site-packages\requests\sessions.py", line 459, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "D:\python\lib\site-packages\requests\models.py", line 314, in prepare
self.prepare_url(url, params)
File "D:\python\lib\site-packages\requests\models.py", line 388, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant http://?
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.