Comments (5)
@sirfengyu 可否将原始的HAR
文件发来看下?
from har2case.
重新看了下HAR
的标准规范,是我理解错了,这里的确是有个bug。
"postData": {
"mimeType": "multipart/form-data",
"params": [],
"text" : "plain posted data",
"comment": ""
}
mimeType [string] - Mime type of posted data.
params [array] - List of posted parameters (in case of URL encoded parameters).
text [string] - Plain text posted data
comment [string, optional] (new in 1.2) - A comment provided by the user or the application.
Note that text and params fields are mutually exclusive.
有些请求类型的postData
中是text
,有些是params
,并且两者互斥。
之前只考虑了text
这种情况,而你的案例中用的是params
,我修复下吧。
from har2case.
@sirfengyu 我刚修复了下,你升级到最新版再试下。
from har2case.
还是同样的har文件:报如下错误
yudeMacBook-Pro:Downloads yufeng$ har2case demo.har demo.yml
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/har2case", line 11, in <module>
load_entry_point('har2case==0.0.8', 'console_scripts', 'har2case')()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/har2case-0.0.8-py2.7.egg/har2case/cli.py", line 60, in main
har_parser = HarParser(har_source_file, args.filter, args.exclude)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/har2case-0.0.8-py2.7.egg/har2case/core.py", line 63, in __init__
self.testset = self.make_testset()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/har2case-0.0.8-py2.7.egg/har2case/core.py", line 296, in make_testset
testset = self.make_testcases()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/har2case-0.0.8-py2.7.egg/har2case/core.py", line 275, in make_testcases
{"test": self.make_testcase(entry_json)}
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/har2case-0.0.8-py2.7.egg/har2case/core.py", line 258, in make_testcase
self._make_validate(testcase_dict, entry_json)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/har2case-0.0.8-py2.7.egg/har2case/core.py", line 219, in _make_validate
resp_content_json = json.loads(content.decode('utf-8'))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
from har2case.
@sirfengyu 修复了,问题在于你测试系统的Content-Type
为application/jose
,这种情况之前是没有兼容的。现在已经好了。
from har2case.
Related Issues (16)
- har2case AttributeError HOT 1
- x-www-form-urlencoded处理的问题 HOT 1
- 对转换导出测试用例request中的key进行排序
- validate方法只有eq 吗? 能否支持下contains或者其他类型的验证? HOT 3
- har转case时的问题。具体看描述 HOT 3
- 除了post请求,其他请求也需要参数 HOT 1
- 现在生成 validate 的时候,只解析支持 dict 类型的 json 吗 HOT 4
- har转换,缺少cookie信息 HOT 1
- 自定义结果校验器问题
- 我用charles把报文导出为har文件,使用命令行转换文件报错 HOT 1
- exclude支持同时指定多个条件 HOT 1
- firefox导出的har和fiddler导出的har有些区别,其中fiddler导出har是可以转换的,firefox不行,具体情况下面详述。 HOT 2
- python2的转换的yaml文件结果不太友好啊 HOT 1
- POST二进制的用例转换报错 HOT 5
- 中文使用手册中 demo-quickstart-6.json 和 demo-quickstart-6.yml无法查看 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from har2case.