Database

The Database block is used to execute a query on an ODBC-compliant database such as Oracle, SQL Server, DB2, MySQL, MongoDB or any other. This can be highly useful for driving automation cases with data.

See the Database lesson to see examples of how to use data from databases in test cases.

Fully expanded, the Database block looks like this:

Database block

The Block Header (“Database”)

The green input connector in the header is used to trigger the block to start executing.

The green output connector in the header triggers when the database query has been executed and the result is ready.

The title of the block (“Database”) can be changed by double-clicking on it and typing in a new title.

Connection

The name of any previously configured ODBC connection on the computere where the test case will be run.

Query

The ODBC-compliant SQL query statement that will be executed on the database.

Text fields (for Query)

Add any number of fields that can contain dynamic content and be used as tokens in the query.

 

Some fields not documented

 

Response Time

The time in milliseconds from the query is sent until the last byte of the response was received.

Timeout

The maximum time spent waiting for the database query to complete before giving up and triggering the green output connector (see above).

The default value is 10 seconds.

Examples of usage:

Author: Claus Topholt, August 5, 2016.