swagger convert jmx
Project description
swaggerjmx
Logo
安装
pip install swaggerjmx
仓库地址:
- github:https://github.com/Pactortester/swaggerjmx.git
- pypi:https://pypi.org/project/swaggerjmx/#history
社区地址
适用场景
- 由于接口测试脚本编写耗时,而且需要持续维护,耗时耗力,使用此工具可以一键生成接口测试脚本.
- swagger-ui接口文档一键生成jmx文件供jmeter使用.
功能
- 将swagger-ui文档转换为jmx文件
Demo_1
- 可以直接访问 swagger_url (http://ip:port/v2/api-doc) 不需要登录的,使用Demo_1方式转换
# -*- coding: utf-8 -*-
from swaggerjmx.convert import conversion
from swaggerjmx.settings import Settings as ST
# swagger_url
ST.swagger_url = 'http://ip:port/v2/api-docs'
# report_path
ST.report_path = 'jmx'
# 开始转换
conversion()
Demo_2
- 需要登录才能访问的,可以复制swagger_url页面上的json信息,保存json文件,使用Demo_2方式转换
# -*- coding: utf-8 -*-
from swaggerjmx.convert import conversion
from swaggerjmx.settings import Settings as ST
# swagger_url_json_path
ST.swagger_url_json_path = 'test.json'
# report_path
ST.report_path = 'jmx'
# 开始转换
conversion()
截图:
- 传入红框中的swagger-ui 地址
- 生成的jmx文件
- jmeter中显示
以上便是 swaggerjmx 的基本用法介绍。
如果您有发现错误,或者您对 swaggerjmx 有任何建议,欢迎到 swaggerjmx Issues 发表,非常感谢您的支持。您的反馈和建议非常宝贵,希望您的参与能帮助 swaggerjmx 做得更好。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swaggerjmx-1.0.7.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file swaggerjmx-1.0.7.tar.gz
.
File metadata
- Download URL: swaggerjmx-1.0.7.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3ef2b251f78725bafaca47f701b604292e60d160bc0b367fb9db098484c06c1 |
|
MD5 | 084e5b62c44d5a759cd9d5d0ae74fd8f |
|
BLAKE2b-256 | 911f7db7c92f2ce849897c79375a5104506e5a55d56b560c1dde84569f137c84 |
Provenance
File details
Details for the file swaggerjmx-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: swaggerjmx-1.0.7-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90c58c7f2ef0ac9d24bcdf5cfa6f7f4708e006d8bb3ab8ba1eed55ecc08ad63a |
|
MD5 | 7bef1e64ab34f2c72b82cc214d6d5b1c |
|
BLAKE2b-256 | 7270cecd209967ee4225f55776a3a34c6bf3a3855ff8d70213acc2d7046cb8d9 |