JDBC Virtual Service Properties

Applies to ReadyAPI 3.54, last modified on September 23, 2024

JDBC virtual APIs (virtual services) have a set of properties similar to those of other virtual services. To view or change them, select your service in the Navigator panel. You will see the properties in the right part of the ReadyAPI window, and in the bottom-left corner of the Navigator panel:

Service virtualization and API tesitng: Properties of a JDBCful virtual service

Click the image to enlarge it.

Properties on the Right

The properties are organized into several groups.

Info

Property Description
Location The computer where the virtual service resides.
Time running The duration of the service run. 0 if the virtual service is not running.
Status Indicates whether the virtual service is running.
Received The number of incoming requests (including those requests for which the service has no virtual operations).
Sent The number of responses the virtual service sent to clients.
Port The port number the virtual service will use for the run. Also, view and change it in the property list in the Navigator panel.
Always assign a separate port for JDBC services, otherwise ReadyAPI will not launch such a service along with with other services on the same port. To start your service from the command line, use the -m argument to specify another port.
Virtual service URL The basic URL that you can use for sending a request to the virtual service. This basic URL includes the JDBC provider, the virtual service computer and port. The URL you use for the call will also include the operation path.
Autostart on server Commands the virtual service to start automatically right after you deploy it to a remote computer.
Ignore unknown writes

Commands the virtual service to create a simulated response for unrecorded write queries (for example, queries with CREATE, INSERT, UPDATE or DELETE statements).

Description

Arbitrary text describing your virtual API. This is the same text you can view and change in the property list in the Navigator panel.

Start Script

The script that is executed right after the virtual service starts. For information on writing scripts and on the available script objects, see Virtual Service Scripting.

Stop Script

The script that is executed right before the the virtual service stops. See Virtual Service Scripting for information on writing scripts and on the available script objects.

OnRequest Script

The script that is run right after the virtual service receives an incoming request.

Note: The script runs for all requests, including those for which your service has no virtual operations.

See Virtual Service Scripting for information on writing scripts and on the available script objects.

AfterRequest Script

The script that is executed after the virtual service replies to the incoming request.

Note: The script runs for all requests, including those for which your service has no virtual operations.

See Virtual Service Scripting for information on writing scripts and on the available script objects.

Properties in the Navigator

JDBC Virtual Service Properties Page

Common
Property Description
Name The virtual service name.
Description Arbitrary text describing the virtual service. Also, view and change it in the property editor in the right part of the product window.
Port The port number the virtual service will use for the run. This is the same value you can see and change in the editor in the right part of the product window.
Always assign a separate port for JDBC services, otherwise ReadyAPI will not launch such a service along with with other services on the same port. To start your service from the command line, use the -m argument to specify another port.

Custom JDBC Virtual Service Properties Page

On this page, you can create, delete, edit and view user-defined properties for the virtual service. You can also see and change these properties in the property editor in the right part of the product window (in the Properties section).

The toolbar above the property list contains commands for creating and deleting properties, changing their order, sorting, clearing property values, and loading property values from and saving them to a file.

JDBC Service Specific
Property Description
jdbcMockService.port The port number the virtual service will use for the run.
jdbcMockService.routeModeEnabled If true, the virtual service will redirect requests to the service specified in the jdbcMockService.targetJdbcUrl property. If false, the service tries to respond with the recorded requests.
jdbcMockService.routeUnmatchedOperation Requires that jdbcMockService.routeModeEnabled be set to true.
If true, the virtual service redirects only the requests that do not exist in the service. If false, redirects requests as specified in the jdbcMockService.routeModeEnabled property.
jdbcMockService.addUnmatchedOperation Requires that jdbcMockService.routeModeEnabled and jdbcMockService.routeUnmatchedOperation be set to true.
If true, the virtual service records redirected requests and adds them to the service. If false, requests are redirected as specified in other parameters and the service is not changed.
jdbcMockService.targetJdbcUrl The JDBC connection string for the real database the virtual service redirects requests to.
jdbcMockService.userName The username to log in to the database. The specified value is inserted into the connection string as user=SpecifiedValue.
jdbcMockService.password The password ReadyAPI uses to log in to the database. The text in the field is masked. The specified value is inserted into the connection string as password=SpecifiedValue.
jdbcMockService.ignoringUnknownWrites The same as the Ignore unknown writes property in the Info section (see above). If it is set to true, the virtual service creates a simulated response for unrecorded write queries.
Some properties are not displayed until you specify them in the editor.

See Also

Reference
JDBC Virtual Services

Highlight search results