Previous Topic

Next Topic

Book Contents

Book Index

Database

In addition to the request/response message exchanges covered above, NeoLoad supports querying and updating databases records via JDBC. These options can be found in the Actions view of the NeoLoad Design perspective. For more information, see Database.

Drivers for Oracle, Microsoft SQL Server, MySQL and PostgreSQL are distributed with NeoLoad. For other database vendors, JDBC drivers can be copied into the lib/jdbc folder under the NeoLoad installation directory.

The first steps are to create a User Path and drag the SQL connection, SQL Statement and SQL Disconnect into the Actions section of the User Path from Actions view above.

For the SQL connection, we need to specify connection details of the database we are connecting to, in this example we use DB2. The connection URL consists of the host, the port and the database name. We also supply the user name and password we use to authenticate. The "connectionName" is user-defined and links our 3 database actions.

Using "connectionName", we specify the "sqlSatement" to execute against the connected database. The "variableName" is used to store the result set returned by the database. Valid types are "QUERY" and "UPDATE".

The last action is closing the connection to the database referenced by the "connectionName".

We can check the User Path like before by selecting the tool bar button shown below and then clicking the Start checking button on the Check User Path dialog.

Looking at the response from the SQL Statement Action, we can see that the query ran successfully and the "ResultSet" variable has been populated.

See Also

Why does Component Testing matter?

So, how is it done?

It functions, but does it Scale?

Let’s test it and find out

Web Services

REST API

JMS

So what’s next…