Convert Swagger apis into jmeter script


Method #1

1. Download "openapi-generator-cli-7.9.0.jar" from https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/

2. get the json file from swagger

3. execute the below command in cmd prompt

 java -jar openapi-generator-cli-7.9.0.jar generate -i sampleAPI.json -g jmeter 


Note:  java should be  in env variables and jar be in  the same path


Method #2

import to Postman and export each API with the curl command

copy the curl command and Jmeter->Tools->import from cUrl->

place the command and import.

Note: Manual effort and recommended for specific APIs 


Comments

Popular posts from this blog

Script for replace the data into the file content using groovy with jsr223

Jmeter Preprocessor to add Dynamic parameters