6. Configure the JDBC Connection

Applies to ReadyAPI 3.57, last modified on December 20, 2024

Now, you have a project with a test case and a default data source test step. You can change it to use a JDBC connection to the database.

  1. Open the test step and in the Data Source drop-down, select JDBC.

    ReadyAPI: The data source test step

    Click the image to enlarge it.

  2. Now, you can configure settings of the JDBC data source.

    ReadyAPI: The JDBC data source

    Click the image to enlarge it.

    First, you need to decide if you want to use a project-wide JDBC connection, or use a specific connection for this test case.

    Working with this tutorial, you should use a test case-specific connection.

  3. Click Configure.

    ReadyAPI: Configuring the JDBC data source

    Click the image to enlarge it.

  4. The Database Configuration dialog appears.

    ReadyAPI: The Database configuration dialog

    First, you need to add the driver.

    The driver will only be available if you placed it in the bin/ext directory.

    ReadyAPI: Selecting the database driver

    Select the jTDS driver.

  5. Now, you can add the remaining connection information, according to the connection template. Use the following table to do that:

    Host 127.0.0.1
    Port 1433
    Database AdventureWorks2014
  6. Click Test connection to verify that the settings are correct.

    ReadyAPI: Testing the database connection
  7. Click OK.

  8. Click OK again.

ReadyAPI will now offer you to use the Query Builder to create a database query from the actual database contents. Usually, you will do that right away, but for purposes of this tutorial, skip it for now. To do that, click No.

ReadyAPI: The Query Builder pop-up window

You have set up the connection.

ReadyAPI: New database connection

Click the image to enlarge it.

Now, you can set up a limit for the data retrieval.

Troubleshooting

If the connection test fails:

  • Verify that your settings are correct.

  • Make sure the driver and dll are in the correct place.

  • Make sure the database server is installed and running on the correct port.

Prev          Next

See Also

Microsoft SQL Databases as Data Sources

Highlight search results