Applies to ReadyAPI 2.8, last modified on August 16, 2019

In the JDBC and the Data Connection data sources, you can use the prepared properties to add variable values to database queries.

The Prepared Properties editor

Click the image to enlarge it.

  • To create a new prepared property, click Add icon on the toolbar of prepared properties and specify the desired name and value. The value of the prepared property can be either constant or any other testing property.

  • To use prepared properties in a query, specify the name of the desired prepared property with the leading colon symbol (:).

  • To delete the selected property from the list, select it and click Remove icon .

Example

To use a dynamic test case property named code in the database request:

The sample prepared property
  1. Create a prepared property and name it country_code.

  2. Set its value to the following property expansion:

    ${#TestCase#property_name}
  3. In the SQL query, add a colon followed by the name of the prepared property.

    SELECT city_name FROM city WHERE CountryCode = :country_code

See Also

JDBC Data Source
Data Connection Data Source
Property Expansion
Data Source Types

Highlight search results