Versions Compared

Key

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

This topic describes how to create virtual assets in CTP from traffic captured with a Parasoft proxy. See Creating Virtual Assets CTP for information about creating virtual assets from service definitions. In this section:

Table of Contents
maxLevel1

Overview

You can create parameterized virtual assets from recorded HTTP/S, JMS, or MQ traffic from the Create Virtual Assets screen in CTP. For

Table of Contents
maxLevel1

Info

This topic explains the advanced interface for creating virtual assets from traffic. This interface is available when CTP is connected to Virtualize 9.10 or higher. For details, on creating virtual assets from traffic with Virtualize 9.9.x, see Creating Virtual Assets from Service Descriptions.

Overview

CTP's "create from traffic" functionality allows rapid creation of parameterized virtual assets from recorded HTTP/S, JMS, or MQ traffic—reducing the time and effort involved in defining complex responses. It also facilitates the editing and extension of data so data captured in one environment (e.g., functional testing) can be easily reused in others (e.g., performance testing, development, security testing, etc.).

For each pass through the wizard, CTP creates one virtual asset (.pva) file with Message Responders that are automatically parameterized with values from a repository that's created on a Parasoft Data Repository server. Data values can then be manipulated independently of the virtual asset. 

CTP's create from traffic The virtual asset creation functionality is designed to process JSON or XML format messages. To create virtual assets from traffic files using other message formats (e.g., EDI, plain text, etc.), use the corresponding "Generate Parameterized Messages" wizard on Virtualize desktoprefer to the Creating Parameterized Message Responders from Traffic section in the Virtualize desktop documentation.

Prerequisites

Creating virtual assets from traffic requires:

...

  • A supported traffic file stored under the recorded_traffic folder on the Virtualize server where you want to create the virtual assets. Acceptable formats include:
    • Logs produced by Virtualize message proxies or recording proxies (see Configuring Message Proxies for details).
    • Message traces or logs captured at the network level using network sniffing tools.
    • HTTP logs obtained by having your application log its traffic.
  • A Parasoft Data Repository Server running and connected to CTP (see Test Data Assistant Setup for details).

...

  1. In the left pane, select the server or folder where you want the new virtual asset added.
  2. Choose Create Virtual Asset from the page-level action menu.
    Image RemovedImage Added
  3. (Optional) Modify the name of the newly-created virtual asset.
  4. Set Create to From Traffic.
  5. If you want to apply the settings saved in a template file (stored in the Virtualize Server's traffic_templates folder), check Apply a template file, and then select the template file that you want to apply.  If you apply a template, settings in subsequent wizard pages will be pre-populated from the settings. You can adjust them as needed without impacting the template. You can also capture the modified settings in a new template.  

  6. Under Repository server, select the Data Repository server where you want the associated data stored.
  7. Under Repository name, select or enter the name of the repository where you want the associated data stored, then click Next.

    Image Modified
  8. In the next wizard page, review the recommended grouping strategy, adjust it if desired, then click Next. For details about the available grouping strategies, see Understanding the Grouping Strategies. Here is a quick overview of the options:
    • HTTP method: HTTP methods will determine whether or not the message is processed.  
    • URL paths: URL paths will determine whether or not the message is processed. 
    • URL parameters: URL parameters will determine whether or not the message is processed. 
    • Request body: XPaths will be used to determine whether or not the message is processed.

      Image Modified
  9. In the following wizard page, review the results of the message grouping.
    • The total number of request/response pairs processed, along with the number of invalid pairs, are shown at the top.
    • The types of columns shown depend on the grouping strategy applied. 
    • Each table row represents the criteria for defining a group. One group will be generated for each table row. One responder will be generated for each group. 

      Image Modified
  10. If you want to modify the automatically-configured request correlations and/or specify the correlated WSDL/schema, expand the associated table row, then configure the correlations and/or WSDL/schema. See Customizing Data Source Correlations for details on how to configure correlations.


    Image Modified

    Info
    titleWhy specify a WSDL/schema?

    Specifying a WSDL or schema ensures that data definitions are tailored to the WSDL/schema rather than inferred by the traffic. Moreover, when you're working with this virtual asset in Virtualize desktop, you also gain richer editing functionality and Change Advisor capabilities.

  11. If you want to save the settings you used in this wizard, check Export a reusable template and indicate the desired file name. By default, traffic will be recorded in a file named %n_%d_%t.traffictemplate within the current server's recorded_traffic folder (this will be created if it does not exist). When specifying the file name, you can use variables such as %d (current date) %t (current time), %n (name), and %u (unique time-based id).  

  12. Click Create Asset.

...

  1. Clear the Autoconfig box.
  2. Expand the row for the responder whose correlations you want to configure.
    Image Modified

  3. Use the available controls to configure correlations. 

...

If you want to override the initial configuration shown in the wizard page, use the available controls to specify the parameter(s) and column name(s) that you want to use. For example, if you wanted to configure a data source correlation for the productCode parameter, you might use:

Image Modified

Anchor
urlpath
urlpath
Request URL Path Correlations

...

For example, if you wanted to use path index 2 and match it to the account data source column, you would configure the correlation as follows:

Image Modified