Looking to get advice on how to approach load testing using JMeter. My question is more about best practices since I am totally new to this tool.
I am confortable working with samplers, view results and thread groups components, was able to send requests and make assertions, get tokens, create variables etc... but I cannot figure out how to approach the following scenario for say 100 users concurrently:
- send login request
- use the returned token to talk to call the API endpoints
- logout
The problem occurs only when running the test for more than one user concurrently, not getting any issues running my thread solely.
When executed concurrently, the first thread group instance always passes the auth step and runs a few requests, but then as soon as other instances get triggered, things go awry (e.g. an instance requests a token (not refresh) while the token exists already, or tries to hit an endpoint when logged out...)
How do you organize your API testing?
If I am planning to test 1000 users hitting the API concurrently, do I really need to provide 1000 accounts to authenticate them, or are there any tips to follow?
For the same application, I've developed automated tests using js/ jasmine / protractor. Is there any chance I can reuse my scenarios in Jmeter? Any library or plugin that may help integrate existing js tests into Jmeter?
Also, is recording my interactions with the app using the recorder the best way to approach load testing SPA applications?
EDIT: I am not required to use JMeter, just gave it a try since it is widely used by QA professionals, I am open to suggestions on tools and ideas how to load and stress test our REST Api / AngularJS app. I've tried Locust.io a load testing Python framework, and i liked it a lot, but again I am trying to stick with Java and JS based tools since those are the only technologies we are using to build and test this app, and some people of my team aren't used to nor interested in Python.