-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add database support #1019
Comments
Thanks for opening this issue! We'd like to support database connections - both so that data for the load test could be retrieved from them, but also because we'd like to be able to actually load test databases. The actual DB connection handling, query execution and measurement (for the load testing) should likely be handled in Go, for performance reasons and because there are nice abstractions and a lot of available drivers (1, 2) that use them. Unfortunately, I can't give an accurate estimation on when we'll get to implementing DB support, since we have quite a lot of other important things in our roadmap. But we'll likely accept quality pull requests for something like this, so if anyone is interested on working on it, feel free to reach out in this issue. |
Hi! Any progress on that? |
Hi @ayaka209 and @paralectvkomodey, I've written a very basic plugin for load testing SQL databases, mainly PostgreSQL, MySQL and SQLite: k6-plugin-sql. It can also be used to read data from or insert data into database in setup/teardown functions. The plugin system is not merged yet, but you can play with it: #1353 and #1396. The instructions are available on Build k6 from source (with plugin support PR), though you still need to fix conflicts before being able to use k6 with plugin support on the master branch. Otherwise, you can use the v0.26.2 tag, which I don't recommend. Also, we'd be happy to hear your feedback. |
+1 for moving this forward :-) |
Hi! Any progress on that?) |
We don't have support for databases in the k6 core yet, but since we introduced xk6 Go extensions in k6 v0.29.0, there have been a number of DB extensions. More details:
Some unofficial k6 DB extensions: |
Additionally there is currently experimental redis support in k6. |
As we have no immediate plan to add native support for database interactions to k6 on our current roadmap, the maintainers' team decided to close this issue in favor of a more specific one. We invite users looking to interact with SQL and NOSQL databases to turn to the xk6 extensions mentioned 👆and listed on our extensions page. |
There are many npm database client but they can't be browserified, some used tcp, some used binaries. so we can't use sqlite, mysql, ... in k6.
please add support for database, or add more support for these npm package
The text was updated successfully, but these errors were encountered: