Top Web Performance Testing Articles

Apica´s Performance Blog is your source for tips, trends and tools for optimizing your web performance. Track current web performance metrics and brenchmarks and new technology in web performance testing.

Configuring and Adjusting Google Protocol Buffer Load Tests

Running Load TestsWeb and cloud applications need more than just good programming to run: The server infrastructure needs to have enough resources to handle the requests of every concurrent user. Inadequate infrastructure can lead to sluggish performance—or even total failure, if too many users push data at the same time. Load testing is a process that involves running virtual users against an application to determine if it performs efficiently under a given workload and gauge the maximum number of users it can simultaneously support. ZebraTester is a toolkit built to perform load tests and interpret the results.  

About Protobuf

The ZebraTester program utilizes Google’s Protocol Buffers, or protobuf, to serialize data for  efficient transfers during the load testing process. Protobuf stores data like XML and JSON, but with one key difference: It does not feature data field or data type information, tags, or values. It efficiently moves only the raw data and relies on sequential order to re-assign values when received. FileDescriptorSets, or .desc files, are used to match the data with the designated values. ZebraTester then interprets this data in a human-readable way.

Automatic Protobuf Message Detection

ZebraTester automatically examines all recorded data from load tests to determine if it includes protobuf data. The program intuitively examines the HTTP request and responses for matching text fragments containing the string “protobuf” in the “Content-Type” header field, and produces a warning message if any information is missing or incorrectly assigned.

Loading the FileDescriptorSet

The previously mentioned .desc files are an essential part of the testing process, as ZebraTester requires this information to produce human-interpretable test results. Running a test requires supplying the transmitted data’s compatible .desc file. Testers can generate the desc file from the source .proto file via a protoc compiler using the following command structure:

protoc –descriptor_set_out=filename.desc filename.proto

The application development team can provide the testing team with the correct .proto file for the test. Assign the .desc file in ZebraTester by copying it to your local machine and registering it as an “External Resource” via the “Declare External Resources” menu.

Load Test DataConfigure the Message Type

The program uses the .desc file to display the transferred data with the relevant field title and related information, but requires configuration to enable this functionality. When this feature is enabled, it’s easy to extract and assign variables and values in the transmitted messages. You can configure the message type by going to the main menu, selecting the link on “Configure the Message Type for all G-PROTOBUF Requests and Responses,” and clicking the magnifying glass for “HTTP Request” or “HTTP Response” under the “Message Type” column. From here the tester can select the message type from the menu or select the question mark icon to automatically assign the type (if the tester does not know the correct value).

Extracting and Assigning Variables

Testers can adjust message field information in ZebraTester as long as the .desc file and message type values are properly configured. To adjust values, select the “PROT” icon from either the “Request” or “Response” content window on the “URL Details / Var Handler” page. This will display a list of editable values with the relevant field names and data types in a table.

Running the Load Tests

ZebraTest can execute the load test program with any protobuf value changes in the same way as when the values are left alone. The program automatically combines all the required resources in a ZIP archive and distributes them to the load generators.

For more information on configuring and executing protobuf load tests with ZebraTester, check out the full guide here.

New Call-to-action
  • I’ve been assisting our system and network administrator for almost 2 years now and this is my first time to encounter about Protobuf. This will be added on my “to study list”.

    • whitneydonaldson

      Hi Chan! That’s great you’re adding it to your study list. Hopefully we can provide more content for you to learn and be introduced to. We’re open to recommendations if you have any as well.