Skip to main content

Swagger/YApi convert jmx

Project description

swaggerjmx

README_EN.md

Build Status PyPI PyPI - Python Version GitHub top language PyPI - Downloads GitHub stars https://blog.csdn.net/flower_drop

Logo

logo

安装

pip install swaggerjmx

仓库地址:

社区地址

适用场景

  1. 由于接口测试脚本编写耗时,而且需要持续维护,耗时耗力,使用此工具可以一键生成接口测试脚本.
  2. swagger-ui接口文档一键生成jmx文件供jmeter使用.
  3. YApi 接口文档一键生成jmx文件供jmeter使用.

功能

  1. 将swagger-ui文档转换为jmx文件

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()

截图:

  1. 传入红框中的swagger-ui 地址

image

  1. 生成的jmx文件

image

  1. jmeter中显示

image

以上便是 swaggerjmx 的基本用法介绍。

如果您有发现错误,或者您对 swaggerjmx 有任何建议,欢迎到 swaggerjmx Issues 发表,非常感谢您的支持。您的反馈和建议非常宝贵,希望您的参与能帮助 swaggerjmx 做得更好。

Project details


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.9.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

swaggerjmx-1.0.9-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file swaggerjmx-1.0.9.tar.gz.

File metadata

  • Download URL: swaggerjmx-1.0.9.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.4

File hashes

Hashes for swaggerjmx-1.0.9.tar.gz
Algorithm Hash digest
SHA256 82693a7b40988a055fecd04aa5745b0d9661c531c909465a02d4780360fbdcff
MD5 b3cbe99500b6544e8fb20d0f6a2d64f9
BLAKE2b-256 818f68886b85f70d817c480fa7f111b079b303c9382144060acaa81bf689411f

See more details on using hashes here.

Provenance

File details

Details for the file swaggerjmx-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: swaggerjmx-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.4

File hashes

Hashes for swaggerjmx-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b4b4e17078296582cf52c96301941ce67c7d88f2fa7aaa279344b80b5eb42e98
MD5 c28d4fa85288fcdb6aa7fc37f195a029
BLAKE2b-256 8d85e029fd00cc8fd701e71070431d010aaac3ad58440799fe870429a0614b14

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page