disconnect database
Close a database connection.
Name | Description | Type | Modifier |
---|---|---|---|
name | Name of the database connection (previously established via the connect database action). | String | None |
None
The following example illustrates the process of a test connecting to, using, and then disconnecting from a database. Use the action disconnect database once you no longer require access to the database.
variable driver host
create connection string Northwind_conn_strg SQL Server lgdn15031-w7d01
 
port database name username
>>> Northwind
 
password others
>>> Trusted_Connection=Yes
 
connection string name
connect database #Northwind_conn_strg Northwind_conn
 
name
use database Northwind_conn
 
command result
execute sql select ContactName from Customers where CustomerID='ABOUT' contactname_ds
 
name filter
use data set contactname_ds
 
value expected
check value #ContactName Thomas Hardy
 
repeat for data set
 
name
disconnect database Northwind_conn
- Note that it is permissible for your test to be connected to more than one database concurrently. In order to switch to using a different database, it is not necessary to disconnect from the current one.
- This action supports the <ignore> modifier. If the string
<ignore>
is present as the value of the argument, or the argument contains an expression that evaluates to<ignore>
, the action is skipped during execution.