This topic explains how to configure monitoring for databases.

Sections include:

Why Monitor Databases?

The Event Monitor allows you to execute a SQL query on a database of your choice after each test executes within the test suite.  

Although the DB Tool can be used for similar purposes, the Event Monitor Database mode is better suited for retrieving database rows when events occur as a result of your application logging messages into a database. 

The Event Monitor is different than the DB Tool in a number of ways:

Configuring Event Monitor to Monitor a Database

  1. Double-click the Event Monitor tool to open up the tool configuration panel.
  2. In the Event Source tab, select Database as the platform.
  3. With Local selected, enter the Driver, URL, Username, and Password for the database you want to query. For details on completing these fields, see Database Configuration Parameters.
  4. (Optional) In the Constraint SQL Query field, enter a value that identifies the last logged value from the database before a test executes. Event Monitor expects that query to return a single value. Typically this would be a table key, an entry number, or a Timestamp.
  5. In the Event SQL Query field, specify the SQL for retrieving the log or event entry from the database. For example, such a query might look like:
    select * from MESSAGE_LOG

  6. In the Options tab, modify settings as needed.