-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does locust support DB connection? #383
Comments
Yes, you can write a custom client class that uses whatever protocol you want: |
Where is your client implementation? You need to override methods in your client (or use getattr as shown in the example) so that they call |
You can check out some more examples here: https://github.com/SvenskaSpel/locust-plugins/tree/c405417065e2f129d4f181519513785763ca50bb/locust_plugins/users |
@MochiXu hi, tell me, did you manage to connect to the database? |
There's now an example User class for Postgres: https://github.com/locustio/locust/blob/master/locust/contrib/postgres.py Here's a locustfile that shows how to use it: https://github.com/locustio/locust/blob/master/examples/postgres/locustfile.py |
@cyberw Can you find out what the error is here, the connection to the Mssql database is not being made? I just hid the user data for now |
@cyberw and how to import locust.contrib.postgres ? |
I'm new to locust, I've been using jmeter for API and DB (using JDBC) load tests. However it seems locust just support API load test (by using
HttpLocust
module).Is there any way for me to connect directly into a DB (say postgresql for example) and run my tests against that db? without using an API (ODBC)
The text was updated successfully, but these errors were encountered: