Endtest

Endtest

›Advanced

Web Tests

  • How to create Web Tests
  • Finding elements in Web Applications
  • How to execute Web Tests
  • Assertions for Web Tests
  • IF Statements for Web Tests
  • Web Applications with restricted access
  • How to test in iframes
  • How to test in multiple tabs
  • How to test File Uploads
  • How to test File Downloads
  • How to test Emails
  • How to test PDF files
  • How to test Chrome Extensions
  • Dealing with reCAPTCHA
  • Dealing with Dynamic Locators
  • Dealing with Canvas Elements
  • Performing a Drag and Drop
  • Execute JavaScript
  • Testing WebRTC Applications
  • How to scroll in Web Tests
  • How to test Checkboxes
  • How to test Dropdowns
  • Dealing with Sessions
  • Web Crawler
  • Export Web Tests
  • Migrating from Selenium

Mobile Tests

  • How to create Mobile Tests
  • Finding elements in Mobile Applications
  • How to execute Mobile Tests
  • Assertions for Mobile Tests
  • IF Statements for Mobile Tests
  • How to scroll in Mobile Tests
  • Performing Complex Gestures

Advanced

  • Variables
  • Waits
  • Endtest API
  • Scheduler
  • Drive
  • Adding Collaborators
  • Computer Vision
  • Importing Test Cases
  • Using Loops
  • Data-driven Testing
  • Send API Requests
  • Read SMS
  • Execute SQL queries
  • Self-Healing Tests
  • Email Notifications
  • Slack Notifications
  • PagerDuty Notifications
  • Webhook Notifications
  • Automatic Backup
  • Advanced Settings
  • Multiple environments
  • How to stop a test
  • Utilities
  • Utilities API
  • Team
  • On-Premises

Integrations

  • Atlassian Jira
  • Slack
  • PagerDuty
  • Microsoft Teams
  • Mattermost
  • Jenkins
  • GitHub
  • Azure DevOps
  • GitLab
  • TeamCity
  • CircleCI
  • TravisCI
  • Bitbucket
  • Heroku
  • Bamboo Server
  • BrowserStack
  • Sauce Labs

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

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

  1. Add a Connect to Database step.
  2. Add the query in an Execute SQL Query or Extract 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

If you want to use Real IP Geolocation in your tests, you'll have to add these entries to the whitelist as well:

GeolocationIP Address
Seattle, US20.64.225.137
Montreal, Canada34.95.28.148
London, UK34.105.231.45
Frankfurt, Germany34.107.105.237
Eemshaven, Netherlands34.90.84.125
Tokyo, Japan34.84.189.97
Seoul, South Korea34.64.73.229
Singapore34.126.70.151
Sydney, Australia35.244.81.5
← Read SMSSelf-Healing Tests →
  • Introduction
  • Steps
Copyright © 2022 Endtest