Fully automatic swagger conversion jmx tool

swaggerjmx

Logo

logo

Install

pip install swaggerjmx

Warehouse Address:

community address

Applicable scene

  1. Since the writing of interface documents is time-consuming and requires continuous maintenance, time-consuming and labor-intensive, using this tool can automatically generate interface documents with one click.
  2. The swagger-ui interface document generates a jmx file with one click for jmeter to use.

Function

  1. Convert swagger-ui document to jmx file

Demo_1

  • You can directly access swagger_url (http://ip:port/v2/api-doc) without login, use Demo_1 method to convert
# -*- 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

  • If you need to log in to access, you can copy the json information on the swagger_url page, save the json file, and use the Demo_2 method to convert
# -*- 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()

The above is the basic usage introduction of swaggerjmx.

If you find an error, or if you have any suggestions for swaggerjmx, welcome to swaggerjmx Issues , thank you very much for your support. Your feedback and suggestions are very valuable, hope your participation can help swaggerjmx do better.

Guess you like

Origin blog.csdn.net/flower_drop/article/details/107094336
JMX