Protobuf is a language-agnostic, schema-based data serialization system created by Google. The Protobuf message format is binary and is considered more efficient than other formats like JSON & XML. The Protobuf extension enables SOAtest and Virtualize to support the Protobuf message format. It can read schemas from a Confluent Schema Registry or saved to a local drive.
Installing the extension adds the Protobuf Client for SOAtest and the Protobuf Message Responder for Virtualize.
You will need to build a Protobuf extension jar to use the Protobuf extension. To do so:
java -jar com.parasoft.soavirt.messages.protobuf.jar <ARGUMENTS> |
The example below (for Windows) shows the command with all arguments. This will generate the jar (protobuf-extension.jar) which can then be added to SOAtest:
java -jar com.parasoft.soavirt.messages.protobuf-<VERSION>.jar -protoc C:\protoc-<VERSION>-win64\bin\protoc.exe -includes -protoDir C:\<PATH_TO_PROTO_FILES> -logLevel 4 |
For more information about the Protobuf jar, run:
java -jar com.parasoft.soavirt.messages.protobuf-<VERSION>.jar -help |
This artifact can be installed from the UI or the command line.
Add the Protobuf .jar file to the system.properties.classpath
property in your settings properties file. For example:
system.properties.classpath=<path to jar>/protobuf-extension.jar
You can add standalone Protobuf clients to your suite using the Add Test wizard or chain Protobuf tools as a payload output of an existing tool using the Add Output wizard. See Adding Projects, .tst files, and Test Suites for details.
Protobuf clients function in a manner similar to other messaging clients but are configured to use the Protobuf format by default. In addition, there are a few configuration options that are unique to Protobuf clients:
XML Conversion Options
Schema for Modeling Request Payload Using Form Input
You can add Protobuf message responders to your suite using the Add Responder wizard. See Creating Message Responders Manually for details.
Protobuf message responders function in a manner similar to other responders. Refer to Message Responder Overview for information on configuring and using responders. There are a few configuration options that are unique to Protobuf message responders:
XML Conversion Options
Schema for Modeling Request Payload Using Form Input
You can also configure the responder to use a different Protobuf message type for incoming requests. To do so:
One of the benefits of using the Protobuf extension is the ability to use it in conjunction with the gRPC Transport in order to send messages in one format and receive messages in another format.