Execute SQL queries
Introduction
You can easily connect to a database and execute SQL queries in your tests.
The following databases are supported by our platform:
- MySQL
- PostgreSQL
- Microsoft SQL
- Oracle SQL
To establish a new connection, select the Connect to Database
option from the Action
dropdown.
If you want to execute a SQL query without fetching the result, use the Execute SQL Query
action.
If you want to get the result from a SQL query, use the Extract result from SQL Query
option from the Set Variable
action. This option allows you to fetch a value from a database and use it in your test.
Steps
- Add a
Connect to Database
step. - Add the query in an
Execute SQL Query
orExtract result from SQL Query
step.
Once the connection to the database is established with the Connect to Database
step, you can continue to execute SQL queries until your test execution finishes.
If you want to execute SQL queries from your tests, make sure that your database can be accessed from our list of Secure Gateway IPs:
Secure Gateway IP Addresses |
---|
34.211.40.72 |
35.166.159.89 |
207.254.40.71 |
207.254.60.102 |
52.89.18.176 |
52.26.12.35 |
54.187.169.42 |
52.43.87.222 |
34.214.85.4 |
54.184.162.15 |
44.237.178.201 |
44.238.105.245 |
44.228.22.115 |
35.81.185.74 |
207.254.52.64 |
44.241.213.227 |
52.26.206.66 |
52.13.40.64 |
44.238.190.158 |
207.254.60.6 |
207.254.41.137 |
207.254.60.76 |
34.213.62.124 |
54.191.53.140 |
18.237.140.182 |
52.11.28.247 |
44.240.94.219 |
If you want to use Real IP Geolocation in your tests, you'll have to add these entries to the whitelist as well:
Geolocation | IP Address |
---|---|
San Francisco, US | 52.53.118.130 |
Seattle, US | 20.64.225.137 |
Montreal, Canada | 3.97.155.50 |
London, UK | 3.9.107.187 |
Frankfurt, Germany | 52.28.171.236 |
Eemshaven, Netherlands | 34.90.84.125 |
Dubai, UAE | 3.28.26.211 |
Tel Aviv, Israel | 51.16.199.215 |
Tokyo, Japan | 18.179.93.49 |
Seoul, South Korea | 13.209.174.252 |
Singapore | 54.151.171.44 |
Sydney, Australia | 54.206.130.168 |