power_settings_new

How to perform data driven testing of API using JMeter?

by (360 points)
+1 vote
127 views
I am automating API test, but I am not sure if we can do performance testing. I need some suggestion here

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

by (142 points)
0 votes
JMeter is more about generating GET and POST requests.

So, ideally you can generate GET and POST requests for your API using JMeter.

To pass test data to your requests, you can

Thread Group  -> Right Click  -> Add -> Config Element -> User Defined Variables

Enter your excel file there.

In JMeter, you can add a controller and a dummy sampler,

While Controller -> Add -> Sampler -> [email protected] - Dummy Sampler

There you can pass your data as, e.g.

{"login":"${login}","password","$(password)"}

in the request data.
add
...