5. Configure the JDBC Connection

Applies to ReadyAPI 3.9, last modified on July 30, 2021

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.

    ReadyAPI: The data source test step

    Click the image to enlarge it.

  2. New data source test steps do not have a type.

    Open the data source menu and select JDBC.

    ReadyAPI: Selecting the data source type

    Click the image to enlarge it.

  3. 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.

  4. Click Configure.

    ReadyAPI: Configuring the JDBC data source

    Click the image to enlarge it.

  5. The Database Configuration dialog appears.

    ReadyAPI: The Database configuration dialog

    Click the image to enlarge it.

    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

    Click the image to enlarge it.

    Select the jTDS driver.

  6. 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
  7. Click Test connection to verify that the settings are correct.

    ReadyAPI: Testing the database connection
  8. Click OK.

  9. 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