I want a load test to run from 20 clients but I have only single machine for this. Is it possible to do this in JMeter or locust?
-
Not sure what you meant by the environment here. Please check - https://stackoverflow.com/help/how-to-ask – Amol Chavan Aug 06 '20 at 07:23
2 Answers
It depends a little on how your server tells clients/users from each other, but yes.
Both locust and jmeter will simulate many users, by holding different cookies/sessions for each user.
Locust will use one http connection per user by default and jmeter can be configured to do so as well.
If your server does something unusual, like IP based load balancing, maybe you can use multiple network interfaces or IPs on your machine and have Locust pick from them (but this isnt usually needed). See https://github.com/locustio/locust/issues/376#issuecomment-541858577

- 11,027
- 3
- 20
- 40
Given you properly configure JMeter in order to behave more like a real browser, at least:
- Correlate all dynamic parameters
- Use HTTP Cookie Manager
- Use HTTP Header Manager
the application under test should treat each JMeter thread as a different user.
If your application is more "smart" and it checks source IP address for the request you can also bind each thread (virtual user) to its own IP address, JMeter's HTTP Request sampler has "Source Address" field where you can specify the desired IP address, the value can be parameterised using i.e. CSV Data Set Config:
More information: Using IP Spoofing to Simulate Requests from Different IP Addresses with JMeter

- 159,985
- 5
- 83
- 133