A Query Database task is for querying a database and validating the result. Examples of databases to query include a clinical application database or the internal integration engine database.
Create a new “Query Database” task
- Right-click the name of the parent Action the new task will be created in
- Select Add New Task –> Query Database
- New Task appears under the parent Action.
- Edit the task name as needed.
Configuring a “Query Database” task
There are several options available.
- Set timing: Specify the wait time before and after execution. Wait times give a sending or receiving system enough time to initiate. They also add a pause between action executions.
- Use default connection: Default database connections are pre-configured data sources. Using default database connections let you change the testing environment by updating the default database connection instead of modifying all tasks individually. More details about how to define database connections are available in the Options page.
- If checked, the application will use the default database connection as defined in application options.
- If unchecked, pick a database connection from the list
- Query: Enter the query to execute on the database. Use the Query Builder to help you building the query if needed. To parameterize the query and make it contextual to the execution, variables can be used within the query statement.
You can retrieve HL7 or XML messages from a database and perform HL7 v2.x or XML validations. To do so, your SQL Query must return only one column (the HL7 or XML message). Then, in the Validation tab, select the appropriate Validation type.
Add validation rules
Validations rules can be added to confirm the query result is as expected. Several validation types can be added: