JMS Virtual Service Properties

Applies to ReadyAPI 3.51, last modified on March 21, 2024

To view or change properties of JMS virtual APIs (virtual services), simply select your virtual service in the Navigator panel. You will see the properties on the right of the ReadyAPI window, and on the left, at the bottom of the Navigator panel:

JMS service virtualization and API testing: Properties of a JMS 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

How long the virtual service is running. 0 if the service is not running.

Status

Indicates if the virtual service is running or not.

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.

TTL / Hop Limit

TTL or hop count is the number of intermediate devices (gateways, routers, bridges, and so on) through which a message walks on its way from the source to the destination. When a message passes from one device to another, a hop occurs.

This property specifies the maximum allowed number of hops for a message. If the message’s TTL counter (or hop counter) exceeds this value, the message is discarded. Use this property to avoid infinite loops between the JMS destination.

Default: 10. 0 means the check for the TTL / hop limit is disabled.

You can also set this property value in the Properties section or in the Custom JMS Virtual Service Properties page in the Navigator.

Autostart on server

Commands the virtual service to start automatically right after you deploy it to a remote computer.

Assertions

A list of assertions that the virtual service applies to incoming requests to verify their contents. For more information on this, see Assertions in Virtual Services.

To add assertions, click and select the desired assertion in the subsequent dialog. To remove an assertion, select it on the list and click . To modify assertion parameters, select the assertion on the list and click .

The service applies assertions in their order on the list. If needed, select an assertion and change its position with the and buttons.

Assertion Results

This section displays assertion results. It includes both service- and operation-level assertions. Green dots denote passed assertions, red dots indicate failed assertions.

Tip:

To view detailed results for an assertion, simply click the assertion on the list. This will display a list of checks grouped by the result and the cause of a fail.

To get to the request and response contents, double-click the timestamp of a fail or successful execution. This will invoke a dialog box, where you can explore the request and response bodies, headers and properties.

Description

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

Properties

A list of user-defined service properties. These are the same properties that you can see on the Custom JMS Virtual Service Properties page in the Navigator panel.

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.

By default, the Properties table contains one property – jmsMockService.ttlHopLimit. It is the same as the TTL / Hop Limit property in the Info section (see above). It specifies the maximum allowed number of hops for a message. If the message’s hop counter exceeds this value, the virtual service declines the message.

Start Script

Groovy script code that executes right after the virtual service starts. For information on writing scripts and available script objects, see Virtual Service Scripting.

Stop Script

Groovy script code that executes right before the moment when the virtual service stops. See Virtual Service Scripting for information on writing scripts and available script objects.

OnRequest Script

Groovy script code 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 available script objects.

AfterRequest Script

Groovy script code that is executed after your virtual service replies to the client 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 available script objects.

Data Sources

Provides information on data sources that your virtual service uses. The Loops column indicates the number of times the service iterated through all the records of the data source during the run.

Properties in the Navigator

JMS Virtual Service Properties Page

Property Description
Name The virtual service name.
Description Arbitrary text describing the virtual service. Also, view and change it in the property editor on the right of the product window.

Custom JMS Virtual Service Properties

On this page, you can create, delete, edit and view user-defined for your virtual API. You can also see and change these properties in the property editor on the right 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.

By default, the page contains the following property:

jmsMockService.ttlHopLimit

Specifies the maximum allowed number of hops for a message. If the message’s hop counter exceeds this value, the virtual service declines the message. Same as the TTL / Hop Limit property in the Info section (see above).

See Also

Reference

Highlight search results