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:

Enabling the Event Monitoring

By default, Parasoft Virtualize is configured to log and report the events related to a Virtualize Server. To view and modify event monitoring settings:

  1. Start Virtualize Server in GUI mode.
  2. In that GUI, open the configuration panel for the server you want visibility into (double-click its Virtualize Server view node).
  3. In the Server Configuration tab, review and modify the available options:
    • Enable the event monitoring service: Enables/disables event monitoring for this server. Event monitoring is enabled by default.
       
    • Event Monitoring Provider: Specifies the provider that the event monitoring service uses. By default, a built-in provider based on ActiveMQ is used. To use another provider, select it from the list of available options, then complete the applicable fields.
    • Port: The default service port number 9617, but a different port number will automatically be assigned based on availability if that port is in use. You can also configure the port manually by setting the following property in your JVM arguments on startup: 

      parasoft.event.monitoring.broker.port=<port>

Starting/Stopping Event Monitoring

Starting

To indicate that you want Virtualize to start reporting the events related to a virtual asset or message proxy, do one of the following:

  • Right-click the asset or proxy in the Virtualize Server view, then choose Start Monitoring.



  • In the proxy’s/asset’s configuration panel, click Start Monitoring.

Note that the related icon will cфсhange to indicate that it is now being monitored.


Stopping

To indicate that you want Virtualize to stop reporting the events related to a virtual asset or message proxy, do one of the following:

  • Right-click the asset or proxy in the Virtualize Server view, then choose Stop Monitoring.
  • In the proxy’s/asset’s configuration panel, click Start Monitoring.



Tips

  • You can start/stop monitoring events at the virtual asset level or message proxy level.
  • You can select multiple virtual assets and start/stop monitoring for all of them with a single right-click command.

Video Tutorial: Monitoring and Recording Traffic from a Message Proxy

In this video, we describe how to monitor and record traffic from a message proxy .


Viewing and Exploring Events

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:

  • Click the Parasoft Event Details button in the shortcut bar (on the top right of the workbench).
  • Click the Open Perspective button in the shortcut bar, choose Other, then choose Parasoft Event Details in the Select Perspective dialog that opens.
  • Choose Window> Open Perspective> Other, then choose Parasoft Event Details in the Select Perspective dialog that opens.

The monitored events will be displayed in the Event Log view in the order in which they occur. Events reported include:

  • Request messages received
  • Response messages sent
  • Data source usage (e.g., which data source row was used in a response message)
  • Error events (a request did not correlate to a message, invalid messages were sent, etc.)
  • Provisioning action suite execution events (see Defining Provisioning Actions for details about action suites

You can explore events as follows:

To achieve this...Do this...
See more details about an eventSelect the related event in the Event Log view
Clear the current information and start a new sessionClick the Start New Log button
Review one of the 5 most recent logsChoose the appropriate log from the Event Log’s History drop-down menu

Reviewing Message Proxy Events

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:

  • Request received: Indicates a message received by a message proxy. Provides details on the  HTTP path or queue name where the message was received, the Virtualize server host name, and the message.
  • Proxy request sent: Indicates that the proxy has forwarded the message to its intended target service destination. Details include the destination and the message contents.
  • Proxy response received: Indicates that the proxy has received a response from the target service.
  • Response sent: Indicates that the proxy has forwarded the response received from the service to the original caller (the AUT).

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 2 for successful transactions: a Request received and Response sent event).

Filtering Events

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.


About Unmatched Messages

"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:

  • No virtual asset or proxy could process a message.
  • One or more virtual assets processed a message but failed to find a matching responder.

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:

  • An incoming message "Request received" event with the message content (labeled as "Unrecognized message").
  • An Error "Error returned" event with details.


Viewing Additional Event Details in CTP

The Event Details perspective is designed to provide you real-time snapshots of the incoming messages, outgoing message, and errors that are occurring at a particular time.

For details on long-running transactions and historical analysis of server events, we recommend using CTP’s event viewing capabilities.


Reporting Custom Events

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 choosing Parasoft> Help> Extensibility API.

Integrating a Third-Party Monitoring System with Virtualize Event Monitoring

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 Parasoft Builtin Provider is used (the default configuration), then 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:61617
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 (choose Parasoft> Preferences, then select  Parasoft> 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 NameValuesMessage Type
Requesttrue | falseRequest received by a virtual asset
proxy_requesttrue | falseRequest received by a proxy
responsetrue | falseResponse sent by a virtual asset
proxy_responsetrue | falseResponse sent by a proxy
Failurestrue | falseFailure event in a responder (e.g., validation failure) or a proxy connection error event
Errortrue | falseError 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:

  • request=true or response=true or failures=true or error=true

The JMS selector expression can be passed to the JMS Session object when creating a consumer:

  • javax.jms.Session.createConsumer(destinationName, selectorExpression, true);

Parasoft Event Details Perspective - GUI Reference

The Parasoft Event Details UI opens the following views by default:

Event Log View

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 5 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):

Details View

This view provides more information about an event selected in the Event Log view.

Filters View

This view allows you to filter events as described in Filtering Events.

  • No labels