DB Testing using Queries
Loadmill provides a service that allows users to execute various queries directly to their DB in order to validate data.



To execute a query:
  1. 1.
    Go to a relevant test flow within a Test Suite.
  2. 2.
    Select "POST" as request Method, put URL - https://db-relay-service.loadmill.com/api/postgres
  3. 3.
    Choose "application/json" as Content-type.
  4. 4.
    Put the request body with the following structure:
body: {
"connectionString": "postgres://...",
"query": "SELECT * FROM USERS"
See a request example below:
By running the request, you will get a response in JSON format and be able to operate the data.


Execute queries directly to MongoDB:
body: {
connectionString: 'mongodb://...',
collection: 'bios',
command: 'find',
query: { "awards.award": "Turing Award" }


Execute queries directly to Redis:
body: {
connectionString: "redis://...",
command:"get | hget | hgetall",
field: "any-field"


Execute queries directly to MySQL 5.7:
body: {
"connectionString": "mysql://...",
"query": "SELECT * FROM TASKS"

DB relay service static IPs

Sometimes, executing queries to your env DB may require VPN. You can easily avoid this by whitelisting the DB relay service static IPs: [,] in your firewall.

Docker image

You can also use a docker image for DB relay service to deploy it in a specific environment of yours, find more information here.