yingoja / demoapi Goto Github PK
View Code? Open in Web Editor NEW基于python的接口自动化测试框架
基于python的接口自动化测试框架
ft1.1: ******* 正在执行用例 ->event_login_001 *********
请求方式: post,请求URL: http://192.168.250.44:6223/xxx/sys/login
请求参数:
post请求body类型为:json ,body内容为:{"t":1584687365417,"departmentNo":"440682111","username":"admin","password":"xxxxxx","uuid":"","captcha":""}
invalid syntax (, line 1)
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\ddt.py", line 151, in wrapper
return func(self, *args, **kwargs)
File "E:\API_auto\DemoAPI\testcase\testAPI.py", line 35, in test_api
self.result = re.json()
AttributeError: 'NoneType' object has no attribute 'json'
这个是report里报的错,看样子是请求失败了,但 不知道为何失败
这个接口postman,还有我单独使用r = requests.post(url, headers=h,data=data_body)都正常请求
另外,控制台的报错:
C:\ProgramData\Anaconda3\python.exe E:/API_auto/DemoAPI/run_demo.py
<_io.TextIOWrapper name='' mode='w' encoding='UTF-8'>
Time Elapsed: 0:00:00.001006
E test_api_1 (testAPI.Demo_API)
失败: server_hostname cannot be an empty string or start with a leading dot.
环境python3.7
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.