In this section:

Introduction

The Parasoft HTTP/2 Transport Extension adds support for the HTTP/2 transport to applicable messaging client tools in Parasoft SOAtest. This allows users to take full advantage of SOAtest's rich interface when they're configuring, sending, and validating messages sent over HTTP/2.

Prerequisites

  • SOAtest 9.9.5 to 2021.2
  • Oracle Java 8 version 1.8.0_5 to 1.8.0_242
  • ALPN

Installation

The tool can be installed from the UI or command line.

JDK Installation

Modify SOAtest to be started with JDK 1.8 instead of default JDK.
For Windows,

  • Launch soatest.exe with -Zjava_home "<full path to the JRE>". For example:
    soatest.exe -Zjava_home "C:\Program Files\Java\jre1.8.0_102"

For Linux/Mac:

  1. Open soatest.sh in an editor.
  2. At the top of the file, set the path to the Java executable for the variable JAVA_EXEC. For example, change the line
    JAVA_EXEC=""
    to
    JAVA_EXEC="/opt/jdk18/bin/java"

ALPN Installation

HTTP/2 uses a TLS extension called ALPN to establish a secure connection. The ALPN implementation to use strictly depends upon the JDK version; see following page for mappings: https://github.com/jetty-project/jetty-alpn/blob/master/docs/version_mapping.properties.

Download the ALPN jar that matches the JDK 1.8 version that will be used for starting SOAtest. You can download jars at https://search.maven.org/artifact/org.mortbay.jetty.alpn/alpn-boot.

  1. Do the following to add the ALPN jar to the boot classpath of the JVM that starts SOAtest:
    1. Edit eclipse.ini in the Parasoft Test installation directory.
    2. Add the following entry to a new line at the very end of the file:
      -Xbootclasspath/p:<path_to_alpn-boot.jar>
      For example:
      -Xbootclasspath/p:c:/jars/alpn/alpn-boot-8.1.1.v20141016.jar

Parasoft Extension Installation

UI Installation

  1. Go to Parasoft > Preferences and click System Properties.
  2. Click Add JARs and select the com.parasoft.soavirt.transport.http2-1.0.0.jar file.
  3. Click Apply.
  4. Restart SOAtest/Virtualize.

Once this jar file is added to the SOAtest/Virtualize classpath, all of the required dependencies will be loaded.

Command Line Installation

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

system.properties.classpath=<PATH_TO_JAR>/com.parasoft.soavirt.transport.http2-1.0.0.jar

Once the classpath is modified, all of the required dependencies will be loaded.

Usage

The HTTP/2 Transport is primarily used in Messaging Client tools (for example, the SOAP Client, EDI Client, and Messaging Client). The transport is configured in the Messaging Client's Transport tab. To use the HTTP/2 Transport in a Messaging Client, select HTTP/2 in the Transport menu, then configure the available options.

The following configuration options are available.

OptionDescription
URLSpecify the URL you want to invoke. The default port is 443.
HTTP MethodThe HTTP method to invoke. All valid HTTP methods are supported. The default is GET.
Ping IntervalFrequency of ping interval (in milliseconds). Pings are used to verify connectivity and tell the server to keep the TCP connection open. The default is 1000.
Connection TimeoutSpecify how long (in milliseconds) to wait for a reply before timing out.
Log LevelSpecify how much information you want logged to the console and the Event Monitoring view. The default is 2 (warn).

HTTP Headers

You can use the available controls to configure as many headers as you wish (up to 10). Specify headers using the name: value format:

Connection Management

OptionDescription
Keep connection alive/ Close connection after test execution

The HTTP/2 transport allows multiple active connections to be used. HTTPS is supported, but HTTP (h2c) is not.
If the connection settings match a connection that is already open (for example, if they have the same hostname and port), then that connection will be reused. If any of the connection settings are different (in terms of hostname and port), then a new connection will be created.
Marking a test as "keep alive" (with Keep connection alive enabled) will tell SOAtest not to call close() on the connection at the end of that test's execution.
To close the connection, a test must be configured as "close connection" (with Close connection after test execution enabled). SOAtest will close the last connection used, which will be the connection used for that test.
Unlike with the built-in HTTP 1.0/1.1 transports, there is no final cleanup of open connections for custom transports when all execution is finished. Instead, it is the user's responsibility to mark the last test of a given connection as "close connection"; if this is not done, the connection will stay open.
For example, in the following scenario both connections will be kept open after the test run is over.

Settings A (keep alive)
Settings B (keep alive)
Settings A (keep alive)
Settings B (keep alive)

To fix this, you would mark the last test for each unique set of settings as "close connection".

Settings A (keep alive)
Settings B (keep alive)
Settings A (close connection)
Settings B (close connection)

Third-Party Content

This extension includes items that have been sourced from third parties as outlined below.

Additional license details are available in this plugin's licenses folder.

  • No labels