The Data Learning tool is used to incrementally extend a virtual asset's reach to cover a broader range of use cases. It automatically expands the data set by observing traffic and adding net new observations to the data repository, enabling teams to rapidly enhance data-driven virtual assets. The update process can be fully automated (invoked whenever new data is detected, via the File Event Listener Marketplace tool) or initiated on an as-needed basis (via provisioning actions).
This tool requires access to a Virtualize Server with version 9.9.5 or later; the tool itself can be used on Virtualize 9.9.0 or higher.
This tool is implemented as datalearningtool.jar. You can install the tool from the UI or the command line.
Add the datalearningtool.jar file to the system.properties.classpath
property in your settings properties file. For example:
system.properties.classpath=<PATH_TO_JAR>/datalearningtool.jar
You can add the tool as a provisioning action if you want to invoke it as needed or integrate data learning into the test environment provisioning process with Continuous Testing Platform.
Add a .pvn file to the project (see Defining Provisioning Actions).
Right-click the Action Suite node and choose Add New > Action.
Choose Data Learning Tool from the Add Action wizard that opens.
If you want it to run automatically whenever new or updated traffic is detected in a specific traffic file directory, chain the tool to the outgoing response of a Message Responder and ensure that the associated virtual asset is configured with the File Event Listener (visit the Parasoft Marketplace to download the File Event Listener). For File Event Listener configuration details, see the documentation that comes with it.
In both cases, the tool will do the following once it is triggered:
The tool is configured by setting the following options.
These options control how the tool identifies and processes traffic files.
Directory to Scan for Traffic Files | Specify the local directory to scan for traffic files. The directory is relative to the Data Learning tool. If the tool is deployed in a .pva that is deployed in "VirtualAssets", it is relative to "VirtualAssets". If the tool is in a .pvn in another project, the path is relative to that other project. |
---|---|
Traffic File Pattern | (Optional) If you want to process only specific traffic files in the above directory, specify a pattern that indicates which traffic files you want to include. You can use |
Template File | Specify the location of the Virtualize configuration template you want to apply to guide the traffic processing. If the tool is deployed in a .pva that is deployed in "VirtualAssets", it is relative to "VirtualAssets". If the tool is in a .pvn in another project, the path is relative to that other project. |
Character Encoding | (Optional) Specify the character encoding for the tool. Default is |
Data Reuse | (Optional) If you want to override the data reuse settings specified in the template file, specify the desired reuse option. |
These options specify which Virtualize Server should process the traffic files.
Use Remote Server (Default: false) | Enter |
---|---|
Host | Specify the host of the Virtualize Server that should process the traffic files. |
Port (Default: 9080) | Specify the port of the Virtualize Server that should process the traffic files. Default is |
Username | Specify a username for authenticating with this Virtualize Server. |
Password | Specify a password for authenticating with this Virtualize Server. |
Upload Path (Relative to VirtualAsset) | (Optional) Specify where on this Virtualize Server to upload the files that are used to identify and process new traffic. This directory should be relative to the Virtualize Server's VirtualAssets project. |
These options specify what Data Repository the new/updated data should be imported into. If you do not specify a host, all Data Repository settings will be taken from the template specific in the Source Traffic tab.
Host | Specify the host of the Data Repository Server where the new/updated data should be imported. |
---|---|
Port | Specify the port of the Data Repository Server where the new/updated data should be imported. The default is |
Username | Specify username for authenticating with this Data Repository Server. |
Password | Specify a password for authenticating with this Data Repository Server. |
This option specifies the level of logging detail that is recorded.
Log Level | Specify how much information you want logged to the console and the Event Monitoring view. The default is If the tool is used in a .pva, information will also be logged to the Event Details perspective. Informational events are logged to the Console if the log level is greater than |
---|
The zip file that you downloaded from Marketplace provides several example configurations and exercises for using the Data Learning tool. The examples show you how to deploy the tool as a tool directly in a Provisioning Action (pvn) and as a tool chained to a Message Responder in a Virtual Asset (pva).
ProvisioningAssets
):localhost
./DataLearner
.VirtualAssets/traffic_files/
on the Virtualize server where the DataLearner Virtual Asset is deployed.DataLearnerExample.traffictemplate
to VirtualAssets/traffic_templates/
on the Virtualize server where the DataLearner Virtual Asset is deployed.DataLearner
Virtual Asset.DataLearner
Virtual Asset over HTTP, causing the chained Data Learning Tool to run. The chained tool uses the traffic template and traffic files that were copied in steps 2 and 3.traffic_files
when done.%n
) and enable New session file for each message pair.If a virtual asset doesn't know how to respond to a given request, you can record the request and its corresponding response from the live service or local server and add it to the Data Repository. The next time the virtual asset receives that same request, the appropriate response will be returned.
In a typical proxy configuration, a connection forwards a request to a virtual asset. If the asset knows how to respond to the request, the response from the associated repository will be returned to the client.
If the virtual asset does not know how to respond to a given request, an error message will be returned to the client and no additional action will be taken.
You can configure Virtualize so that the request and corresponding response will be recorded and added to the Data Repository (see Configuration below). The following outline describes the overall process for "teaching" a virtual asset how to respond to new requests.
The traffic file creation/update triggers the virtual asset's File Event Listener, which invokes the responder with the Data Learning tool.
The Data Learning tool sends the traffic file to the designated Virtualize Server, which then uses the designated template file to process the traffic and add it to the Data Repository.