Skip to main content
Version: 1.0.1

Use API in test scenarios, test suites

Configuring a JDBC test is the configuration step that creates the commands, but where and how to use the JDBC test will be completely configured by the user on the test scenario.

How to use JDBC in Test Scenario

Step 1: Access the Low-code screen within the test scenarios. Refer to Low-code Test scenario.

Step 2: Use the Key-word Controller as “Client” and set the Platform to JDBC.

alt text

Step 3: Drag the key-word JDBC CALL into the low-code screen within the JDBC client.

alt text

Step 4: Configure the JDBC Call Property, and select the data code in the JDBC call property screen.

alt text

Step 5: The screen will display a list of initialized JDBC instances. Click to select the JDBC you want to call.

alt text

Step 6: After selecting the JDBC, the JDBC call property screen for the JDBC call keyword will change.

alt text

Enter the required information:

FieldMandatoryFormatConstraintsDescription
CodeYesAutoCompleteThe code of the selected JDBC from JDBC Lib
Step Comment-TextDescription for calling the JDBC
Input Input parameters used for JDBC
Các parameter InputDisplays if there are parameters defined in the selected JDBC’s parameter list or in the query builder configuration (if any).Enter data to be used as input parameters for the JDBC query.
Output Output parameters for JDBC
TypeYesComboboxDisplays a list of data types for the output variable. The user can select one value.
Data TypeYesComboboxDefault selection: Call OutputThe data type for the output variable, which holds the returned output of the JDBC.
NameYesTextThe name of the variable that will store the output value.

Step 7: Click the Close button to save the JDBC call property. You will see the low-code line as follows:

alt text

Step 8: Use the key-word Assign Value to create a variable that will store the assigned value. The data returned from the database query is in the form of a list. Therefore, you need to use a loop (for) to extract the output.

alt text

The Jdbc_result is an output containing a list of callOutputs, so when using the loop to iterate through the JDBC call output, each loop will go through each row of data returned.

alt text

Configure a variable to store the value.

alt text

Configure the value to be extracted from the response, at the output returned by JDBC. The returned dataset is in the form of Call Output. Extract the value of a specific element from the Call Output.

alt text

Step 9: Click Save in the Low-code section. When the scenario is executed, the data will be returned according to the output parameters that were configured.

alt text