Database modules
The technology-specific modules for databases are standard modules that perform specific tasks. Tosca Cloud supports the following database modules:
-
DB Open Connection, this connects to one or more databases.
-
DB Current Connection, this updates a connection.
-
DB Close Connection, this manually closes the connection.
-
DB Run SQL Statement, to manage data sets from database tables.
-
DB Expert module, to manage your database statements.
DB Open Connection
Opens a connection to a database. You can open multiple database connections. Tosca Cloud uses the most recently established connection for your tests. Alternatively, you can specify a different connection with the module Current Connection.
Value |
Description |
---|---|
Connection name |
Name of the connection that you want to open. This is optional. By default, Tosca Cloud uses the DSN value as connection name. If you enter a Connection name that already exists, Tosca Cloud doesn't establish a new connection. |
DSN |
Data source name for ODBC databases. If you want to connect to SQLite, MS SQL, or generic ODBC databases, use Connection string. |
DSN->User ID |
ID of the user that opens the connection. |
DSN->Password |
Password of the user. |
Connection string |
Connection string to connect to SQLite, MS SQL, or generic ODBC databases. |
Connection string->Driver |
Specify whether you're using an SQLite, MSSQL, or generic ODBC database. To do so, select the respective value from the Value dropdown. |
DB Current Connection
Specifies that you want to use a different connection than the most recently opened connection.
Value |
Description |
---|---|
Connection name |
Name of the connection you want to use. |
DB Close Connection
By default, Tosca Cloud closes all open connections once it has finished the execution.
Alternatively, you can manually close the connection with the Module DB Close Connection. In this case, the database technology also deletes the resource created when the connection was opened.
We recommend that you pay close attention to which connection you close. Only close connections that you don't need in a subsequent test case.
Value |
Description |
---|---|
Connection name |
Name of the connection you want to close. |
DB Run SQL Statement
Steers data sets of one or more database tables. It accesses the database of the most recently opened connection. If you specified a different connection with the module DB Current Connection, then the module accesses this database instead.
Value |
Description |
---|---|
SQL Statement |
SQL statement you want to run. |
Command Timeout |
Time in seconds that Tosca Cloud should wait before it aborts the SQL statement and reports it as failed. The default timeout is 60 seconds. If you set the value to 0, it waits indefinitely. |
Result Table |
If needed, you can buffer or verify the table property RowsAffected. This property indicates how many rows the specified SQL statement affected. If the statement didn't affect any rows, the value is 0. For SELECT statements, the value is -1. Alternatively, if you want to export the result of your SQL Statement into a comma separated CSV file:
If the file doesn't exist at runtime, Tosca Cloud creates it. If a file with the same name already exists under this path, Tosca Cloud overwrites the existing file. |
Row / Row->Cell |
Specify the cell in a particular row you want to steer. You can use any of the table steering read-only action modes. The Input and Insert action modes are not supported. |
Column / Column->Cell |
Specify the cell in a particular column you want to steer. You can use any of the table steering read-only action modes. The Input and Insert action modes are not supported. |
DB Expert module
Handles your database statements with a single module.
Value |
Description |
---|---|
Open Connection |
Read-only. |
Open Connection->Connection name |
Name of the connection that you want to use, if you have already opened a connection. You can also open a new connection. In this case, use Connection Name together with one of the following connection identifiers:
|
Open Connection->DSN |
Data source name for ODBC databases. If you want to connect to SQLite, MS SQL, or generic ODBC databases, use Connection string. |
Open Connection->DSN->Password |
Password of the user. |
Open Connection->Connection String |
Connection string to connect to SQLite, MS SQL, or generic ODBC databases. |
Open Connection->Connection String->Driver |
Specify whether you're using an SQLite, MSSQL, or generic ODBC database. To do so, select the respective value from the Value dropdown. |
SQL Statement |
SQL statement you want to run. |
Command Timeout |
The waiting time in seconds before the system aborts and reports the SQL statement as failed. The default timeout is 60 seconds. If you set the value 0, the timeout is indefinitely. |
Result Table |
If needed, you can buffer or verify the table property RowsAffected. This property indicates how many rows the specified SQL statement affected. If the statement didn't affect any rows, the value is 0. For SELECT statements, the value is -1. Alternatively, if you want to export the result of your SQL Statement into a comma separated CSV file:
If the file doesn't exist at runtime, Tosca Cloud creates it. If a file with the same name already exists under this path, Tosca Cloud overwrites the existing file. |
Row / Row->Cell |
Specify the cell in a particular row that you want to steer. The system supports all read-only table steering action modes. It doesn't support action mode Input and Insert. |
Column / Column->Cell |
Specify the cell in a particular column that you want to steer. The system supports all read-only table steering action modes. It doesn't support action mode Input and Insert. |
Close connection |
Specify whether you want to close the connection:
|