Pactortester/swaggerjmx

swagger_ui 传入域名地址时报错,如图所示

murph-zh opened this issue · 10 comments

swagger_ui 传入域名地址时报错,如图所示

传入http://ip:端口/v2/api-docs, 运行正常!

image

可以先用ip+端口,进行转换使用,后续1.0.2版本回修复

使用IP:port的方式也报错,错误如下
image

`/usr/local/bin/python3.8 /Users/milier/Code/PycharmProjects/QaTools/swaggerTojmx.py
Traceback (most recent call last):
File "/Users/milier/Code/PycharmProjects/QaTools/swaggerTojmx.py", line 12, in
conversion()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/swaggerjmx/convert.py", line 12, in conversion
result = get_test_plan(ST.swagger_url)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/swaggerjmx/get_swagger.py", line 14, in get_test_plan
data = json.loads(response.text)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Process finished with exit code 1
`

请确保 你能访问公司内网!!!

http://ip:端口/v2/api-docs

已修复请更新v1.0.4 验证
pip install swaggerjmx==1.0.4 -i https://pypi.org/simple

好使了,谢谢

已经更新为1.0.4.版本,使用Demo2报错
Traceback (most recent call last): File "/Users/milier/Code/PycharmProjects/QaTools/swaggerTojmx.py", line 37, in <module> swaggerJsonTojmx() File "/Users/milier/Code/PycharmProjects/QaTools/swaggerTojmx.py", line 34, in swaggerJsonTojmx conversion() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/swaggerjmx/convert.py", line 12, in conversion result = get_test_plan(swagger_url=ST.swagger_url, swagger_url_json_path=ST.swagger_url_json_path) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/swaggerjmx/get_swagger.py", line 35, in get_test_plan thread_group["port"] = str(host).split(":")[1] IndexError: list index out of range

@milier110 再开个issues,我找到问题了!

已修复请更新v1.0.5 验证
pip install swaggerjmx==1.0.5 -i https://pypi.org/simple

@milier110

已修复请更新v1.0.5 验证
pip install swaggerjmx==1.0.5 -i https://pypi.org/simple

@milier110

好用了,谢谢。

已修复请更新v1.0.5 验证
pip install swaggerjmx==1.0.5 -i https://pypi.org/simple
@milier110

好用了,谢谢。

如果有帮助,请点个star !!!