Previous Topic: Sidecar Files with Request-Response PairsNext Topic: Create Service Image by Recording


Create a Service Image from PCAP

If you use packet capture software such as Wireshark to create logs of traffic, VSE can use those logs to create a virtual service image from a packet capture file (PCAP).

Prerequisites:

  1. Download the appropriate binary package for your operating system from http://jnetpcap.com/download.
  2. Add the jnetpcap.jar from the binary package to the LISA_HOME\lib directory and the jnetpcap native library to the LISA_HOME\bin directory.

    The native library is different for different operating systems. For Windows, it is jnetpcap.dll.

    The PCAP functionality is now configured.

  3. Restart DevTest Workstation (if it is running) to pick up the configuration changes.

Follow these steps:

  1. Right-click the VirtualServices, Images folder and select Create New VS Image, From PCAP.

    Enter a service image name and the name of a virtual service model file.

    Accept the default values for the remaining fields on this window.

    Note: To load parameters from a previously saved service image, click Load from File Image of blue folder icon at the bottom of the window.

  2. (Optional) To add documentation about this virtual service, click the Notes tab.
  3. Click Next.

    The data protocol window opens.

  4. Click Next.
  5. To select the packet capture file to be used for input, enter the file name or browse the file system.
  6. Select HTTP/S as the transport protocol, and click Configure.

    The Virtual Service from PCAP Transport Protocol Configuration window opens.

  7. Enter the following configuration options:
    Listen/Record on port

    Defines the port on which the client communicates to DevTest.

    Target host

    Defines the name or IP address of the target host where the server runs.

    Target port

    Defines the target port number listened to by the server. Leave this field blank if you will select a Proxy passthrough style.

    Defaults: 80 (HTTP) and 443 (HTTPS)

    Note: Target host and Target port are important. They determine how DevTest matches packets. Select Gateway and enter the IP address and port of the server hosting the service to be virtualized. You could have some network traffic for every computer on the subnet where the capture was performed, depending on how the PCAP capture was done. Given an IP address and port, the data can be filtered from the file for all packets going to or from a specific IP and port. Then those packets are reconstructed to form valid TCP streams, which remove duplicates, and reorders packets in the correct order, and so forth. This work is all done for you by the operating system TCP stack during a real recording. These streams are replayed to the real protocol (HTTP) and as far as the protocol is concerned, the data arrives over a valid TCP stream.

    Recorder passthru style

    Specifies how VS Image Recorder acts during recording. Select Gateway.

    Use SSL to server

    Specifies whether DevTest uses HTTPS to send the request to the server.

    • Selected: DevTest sends an HTTPS (secured layer) request to the server.

      If you select Use SSL to server, but you do not select Use SSL to client, DevTest uses an HTTP connection for recording. DevTest then sends those requests to the server using HTTPS.

    • Cleared: DevTest sends an HTTP request to the server.
    Use SSL to client

    Specifies whether to use a custom keystore to play back an SSL request from a client. This option is only enabled when Use SSL to server is selected.

    Values:

    • Selected: You can specify a custom client keystore and a passphrase. If these parameters are entered, they are used instead of the hard-coded defaults.
    • Cleared: You cannot specify a custom client keystore and a passphrase.
    SSL keystore file

    Specifies the name of the keystore file.

    Keystore password

    Specifies the password associated with the specified keystore file.

    Note: For more information about configuring VSE in a two-way SSL environment, see Virtualizing Two-way SSL Connections.

    Allow duplicate specific transactions (good for NTLM)

    Specifies whether to record duplicate specific transactions.

  8. Click Finish to return to the previous window.
  9. Click Next to start recording.