This topic explains how to use the Parasoft Event Details perspective to gain insight into events that occur on the Virtualize Server (request messages received, response messages sent, errors, and so forth) and the message proxies that are deployed on them. This functionality is available for both local and remote Virtualize Servers.
You can determine which Virtualize Server’s events are monitored, then start/stop reporting of these details on demand.
Sections include:
By default, Parasoft Virtualize is configured to log and report the events related to a Virtualize Server. To view and modify event monitoring settings:
Event Monitoring Provider: Specifies the provider that the event monitoring service uses. By default, a built-in provider based on WebSocket is used. To use another provider, select it from the list of available options, then complete the applicable fields.
If you have upgraded to Virtualize 2024.1 or later from a previous version, your default monitor will be the legacy built-in ActiveMQ-based provider. You can change to the built-in WebSocket-based provider, which can be advantageous when, for example, you want to secure events with SSL (so your Tomcat is configured to have secure ports) or when deploying in Kubernetes, where it can make setting up Ingress easier by granting single port access for virtual assets and events. |
parasoft.event.monitoring.broker.port=<port>
To indicate that you want Virtualize to start reporting the events related to a virtual asset or message proxy, do one of the following:
Note that the related icon will сhange to indicate that it is now being monitored.
To indicate that you want Virtualize to stop reporting the events related to a virtual asset or message proxy, do one of the following:
|
|
The Parasoft Event Details perspective is designed to help you view and explore events that occur on the Virtualize Server (request messages received, response messages sent, errors, and so forth).
You can open this perspective in any of the following ways:
The monitored events will be displayed in the Event Log view in the order in which they occur. Events reported include:
You can explore events as follows:
To achieve this... | Do this... |
---|---|
See more details about an event | Select the related event in the Event Log view |
Clear the current information and start a new session | Click Start New Log |
Review one of the five most recent logs | Choose the appropriate log from the Event Log’s History menu |
Viewing the events generated when messages flow through a deployed message proxy helps you understand what traffic the application under test is sending through the message proxy. Generally, every request/response message pair that travels through a message proxy will generate the following events:
Note that if the proxy is configured to forward messages to virtual asset endpoints, then the same events will be generated and message destination details will include the URL or destination details to indicate that. However, if the virtual asset which receives that proxy message is also being monitored, it will generate its own events (typically two for successful transactions: a Request received and Response sent event).
You can use the controls available the Filters view to zero in on the events you want to focus on. You can filter the Event Log as follows:
To achieve this... | Do this... |
---|---|
Limit the number of events displayed and saved in the event log. | Modify the Max event count value. |
Focus on events whose "details" contain specified text (case sensitive). | Enter the string in the Only events that contain field. |
Hide messages that cannot be correlated to a virtual asset or proxy. | Disable Unmatched messages. See About Unmatched Messages below for details. |
Show only error events (errors result from uncorrelated messages or failed validations). | Enable Errors only. |
Show/hide events from specified servers, virtual assets, or responders. | Enable/disable Events from checked sources options. |
"Unmatched messages" are messages that cannot be correlated to a virtual asset or proxy. If the Event Log is set to show unmatched messages—and at least one virtual asset or proxy is configured to be monitored—events reported will include cases where:
If a message received by Virtualize server a) does not match virtual asset or proxy path criteria OR b) matches virtual asset criteria but no responder within the .pva has responder correlation criteria that match this message, then two events will be logged:
The Extension Tool (described in Extension Tool for Custom Scripting) can be used to report custom events to the Event Log by calling the report(IEvent)
method of the given com.parasoft.api.ScriptingContext
object.
Here is a Jython example:
from com.parasoft.api import Event def test(input, context): context.report(Event("Here I am!")) |
See com.parasoft.api.ScriptingContext
and com.parasoft.api.IEvent
in the Extensibility API Javadocs for more information. The Javadocs can be accessed by going to Parasoft > Help > Extensibility API.
Virtualize Server event monitoring leverages a JMS broker. It can be configured with any JMS-compliant broker to facilitate the communication of events between the server and event subscribers. If the ActiveMQ configuration (Parasoft Builtin Provider) is used, you can use the following configuration in a third-party application in order to subscribe to Virtualize Server Events over JMS:
JNDI Connection URL: tcp://VirtualizeHostName:9617 JNDI Initial Context class: org.apache.activemq.jndi.ActiveMQInitialContextFactory JMS Connection Factory: ConnectionFactory Destination Name: PARASOFT_SERVER_EVENTS Destination type: Topic |
Note that the Virtualize Host port is assigned dynamically at server startup based on availability. To check the actual port number, open the server’s configuration page (from the Virtualize Server view) or open the Server preferences page (go to Parasoft > Preferences, then click Server).
The JMS messages that are published by the Virtualize Server event monitoring service are in XML format. If you are interested in only certain event types, you can use a JMS selector expression to receive only events that meet your criteria:
Property Name | Values | Message Type |
---|---|---|
Request | true | false | Request received by a virtual asset |
proxy_request | true | false | Request received by a proxy |
response | true | false | Response sent by a virtual asset |
proxy_response | true | false | Response sent by a proxy |
Failures | true | false | Failure event in a responder (for example, validation failure) or a proxy connection error event |
Error | true | false | Error event (any errors that are not specific to a virtual asset or a proxy) |
For example, if you want to subscribe to request and response messages for virtual assets, failures, and errors—but not to proxy message events—you would use the following expression:
The JMS selector expression can be passed to the JMS Session object when creating a consumer:
The Parasoft Event Details UI opens the following views by default:
This area displays virtualization-related events such as messages sent, messages received, and errors. Selecting an item here displays more information in the Details view. The five most recent logs are saved and available.
For instance, the following log shows Virtualize Server events:
The following log shows both Virtualize Server events and SOAtest test events (for tests executed by SOAtest with event logging enabled):
This view provides more information about an event selected in the Event Log view.
This view allows you to filter events as described in Filtering Events.