Generate request payload from JSON schema or OpenAPI spec

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Generate request payload from JSON schema or OpenAPI spec

Vineet Bhatia
Hi All,

New JMeter user here.

I am writing a test scenario which invokes multiple HTTP REST APIs. Is there a way to generate HTTP request payload from OpenAPI spec?

Basically I am looking for equivalent of json-schema-faker. One option is to call the json-schema-faker-cli from groovy script.

Is there a JMeter/Java native way to create HTTP request payload from OpenAPI spec?

Thanks,
Vineet Bhatia
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Generate request payload from JSON schema or OpenAPI spec

glinius@live.com
The only way of automatically creating a JMeter test from API definition is
using  SoapUI <https://www.soapui.org/>   as interim step.

So given you have SoapUI you should be able to import Swagger / OpenAPI
definition into SoapUI project:
<http://www.jmeter-archive.org/file/t340375/Screen_Shot_2018-02-18_at_13.png>

And once done you can  convert your SoapUI project into JMeter script
<https://www.blazemeter.com/blog/how-convert-soapui-xml-jmeter-jmx>   using  
Taurus <http://gettaurus.org/>   tool.



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Generate request payload from JSON schema or OpenAPI spec

Andrew Burton
Another way of doing this is via Swagger-codegen, which has a JMeter output
template - an example of generating a JMeter file from a Swagger definition
is available here: https://wilsonmar.github.io/swagger-codegen/

Effectively the JMeter script is generated from a mustache template, so it
will be a very generic JMeter script.


On Mon, Feb 19, 2018 at 5:15 PM, [hidden email] <[hidden email]> wrote:

> The only way of automatically creating a JMeter test from API definition is
> using  SoapUI <https://www.soapui.org/>   as interim step.
>
> So given you have SoapUI you should be able to import Swagger / OpenAPI
> definition into SoapUI project:
> <http://www.jmeter-archive.org/file/t340375/Screen_Shot_
> 2018-02-18_at_13.png>
>
> And once done you can  convert your SoapUI project into JMeter script
> <https://www.blazemeter.com/blog/how-convert-soapui-xml-jmeter-jmx>
>  using
> Taurus <http://gettaurus.org/>   tool.
>
>
>
> --
> Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>