DB Connect

DB Connect is used to create a connection with the database in order to modify or retrieve data from the mentioned database.

How to navigate to DB Connect ?

  1. Click on Configure on the left panel.

  2. Click on DB Connect.

 

DB Connection String format : Type | Name / IP Address : Port | SID | Database Name | User Name | Password

 

The database types available in BQ Platform are :

  1. Oracle

  2. MySQL

  3. SQL Server

  4. Postgres

 

Pre-requisite :

  • If you are using localhost, make sure the server is running on your machine.

 

How to use DB Connect ?

 

For example, the DB Connect variable created is :

Variable Name

Type

Name/IP Address:Port

SID

Database Name

User Name

Password

Variable Name

Type

Name/IP Address:Port

SID

Database Name

User Name

Password

bqdbString

MySQL

localhost:xxxx

 

testDB

username

xxxxxxxx

Now, suppose we wish to use this DB connect to retrieve data.

In the test case, use the keyword “executeQueryAndStoreResult“ and click on Data button for this keyword. You will see the below parameters :

  • Data Base String : Select the data type as Global Variable and select the connection string (in this case bqdbString)

  • Query : Enter the query you wish to make

  • In Variable : Enter a variable name to store the retrieved data

Click on Update button and execute the test.

The retrieved data will be store in the mentioned variable and this variable can be used further in the test.

 

 

https://bqurious.atlassian.net/wiki/spaces/BSD/pages/447185005