Print

Query Modelling – The database actions

Databases

Database testing enables a more thorough verification of the application. That’s why we have introduced the capability to execute queries in JOSF and validate them using our renowned action pack. For this particular database action pack, we have developed six actions that can validate and extract data in your tests. You can access the description of each action by clicking on the six buttons below.

Extract actions

The extract actions are designed to retrieve data from your query and store it in a variable. We have developed two extract actions: one for retrieving an exact value and the other for obtaining the number of rows returned by your query. In the explanation blocks below, you’ll find additional information

Extracting a datacell value to an variable

This operation extracts the value of a specific data cell in a database row to an variable. The Object field contains the column-name and the name of the variable to the Data field.

Configuration

In subaction you can select your desired row.
When you select Extract selected row you can put the desired row in the option field under select row.

Extract Row Count into a variable

This operation extracts the amount of rows your query returned. The Object field remains empty and the name of the variable goes in to the Data field.

Configuration

n/a – this sub action has no extra configuration

Verify actions

The verify actions are designed to validate data from your query. We have developed four verify actions: one for validating an exact data cell value, one for confirming the number of rows your query returned, one for checking the response message accompanying the query, and one for measuring the time it took for the query to respond.

Verify datacell value

This verification work with Expected and Actual data. The actual value data is extracted from the given Object. The object is the columname, and the row is selected by the subaction. The expected value is provided in the Data field in your step, with an oparator.

Configuration

In subaction you can select your desired row.
When you select Extract selected row you can put the desired row in the option field under select row.

You can use the following operators ‘=, >, <, =>, =<, != or ~’. Omit the operator to verify the exact match (equals the ‘=’ operator)

Verify Row Count

This operation verifies the amount of rows your query returned. The Object field remains empty and the expected value with your operator goes in to the Data field.

Configuration

You can use the following operators ‘=, >, <, =>, =<, != or ~’. Omit the operator to verify the exact match (equals the ‘=’ operator)

In this document