Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2023.2

...

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 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 is implemented as datalearningtool.jar. You can install the tool from the UI or the command line.

UI Installation

  1. Choose Go to Parasoft > Preferences and click System Properties.
  2. Click Add JARs and browse for select the datalearningtool.jar file.
  3. Click Apply and restart .
  4. Restart Virtualize.

Command Line Installation

Add the datalearningtool.jar file to the system.properties.classpath property in your settings properties file. For example:

system.properties.classpath=<path to jar><PATH_TO_JAR>/datalearningtool.jar

Usage

...

  1. Add a .pvn file to the project (see Defining Provisioning Actions) and right.

  2. Right-click the Action Suite node and choose Add New > Action.

  3. Choose

    Add New> Action and choose

    Data Learning Tool from the Add Action wizard that opens.

  4. Click Finish and configure the tool (see Configuration).

...

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 File Event Listener documentationdocumentation that comes with it.

In both cases, the tool will do the following once it is triggered:

...

Use Remote Server (Default: false)

Enter true to configure the tool to use the settings specified in the tool configuration settings. Enter to false process the traffic files on the local server using the local desktop license. Default is false.

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 9080.

UsernameSpecify a username for authenticating with this Virtualize Server.
PasswordSpecify 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. This setting is optional.

Data Repository Settings

...

  1. Copy the following files to a project within your workspace (such as ProvisioningAssets):
    • DataLearner.pvn
    • DataLearner_1.txt
    • DataLearner_2.txt
    • DataLearningExample.traffictemplate
  2. Invoke the .pvn by either running it directly in the Virtualize UI or through CTP. The tool will scan the directory for the traffic template and DataLearner_*.txt traffic files, importing data from them into the Data Repository on localhost.

Using the Tool Chained to a Responder

  1. Deploy DataLearner.pva as a Virtual Asset in Virtualize at the HTTP path: /DataLearner.
  2. Copy DataLearner_1.txt and DataLearner_2.txt to VirtualAssets/traffic_files/ on the Virtualize server where the DataLearner Virtual Asset is deployed.
  3. Copy DataLearnerExample.traffictemplate to VirtualAssets/traffic_templates/ on the Virtualize server where the DataLearner Virtual Asset is deployed.
  4. (Optional) Update the Environment in DataLearner.tst to point to the correct Virtualize host.
  5. (Optional and but recommended) Start Monitoring the DataLearner Virtual Asset.
  6. Run DataLearner.tst. This test invokes the 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.
  7. Note that events are reported to the Virtualize Event Log and that the traffic files are deleted from trafficfrom traffic_files when done.

Using a Message Proxy to Record Transactions

  1. Create a Message Proxy and add a connection (see Creating Proxies).
  2. Configure the connection to use a unique traffic file pattern (i.e., %n) and enable the New session file for each message pair option.
  3. Make sure the Data Learning Tool is configured to scan the directory to which the Proxy Connection will record. Relative paths in the Data Learning Tool configuration are relative to the .pva or .pvn that contains the tool.
  4. Record traffic normally through the Message Proxy.
  5. Run the Data Learning Tool to process recorded transactions.

...

  1. Configure the Message Proxy's primary connection to forward to the virtual asset.
  2. Configure the Message Proxy's secondary connection to forwards to the live virtual service.
  3. Enable the Record on secondary connection only and New session file for each message pair options for the Message Proxy.

     
  4. Configure the virtual asset to use the File Event Listener as a Custom Transport and configure the listener to monitor the directory where the proxy will save traffic files.

     
  5. Add a responder with a Data Learning Tool chained to it to the .pva associated with the virtual asset.  
  6. Configure the tool to add data to the Data Repository that originally did not have the request/response.