UDP Request

Download

This plugin adds UDP protocol support to JMeter. With this plugin you can load test DNS, NTP, TFTP, Boot servers and many-many other systems.

Since UDP may be used both in one-way and two-way communications, there is option to wait for response and corresponding timeout setting.

"Close UDP Socket" - the flag to close socket after processing request. Otherwise, the socket will stay open for the next iteration.

"Bind Local Address/Port" - the options to manually choose which local IP and port should be used to send the request.

Encode/Decode Class

Most of UDP applications use binary packet data, which cannot be directly specified in JMeter GUI. UDP Request use encode/decode classe (like TCP Sampler do) to convert request data from GUI into UDP packet data and response data back from binary to GUI-visible text data.

There is embedded encode/decode classes:

Full Class NameComments
kg.apc.jmeter.samplers.HexStringUDPDecoderThis is most useful implementation, converts data from/to HEX-encoded sequences. For example, 6a6d6574657220706c7567696e73 corresponds to jmeter plugins.
kg.apc.jmeter.samplers.DNSJavaDecoderThis implementation requires Extras With Libs Set to be installed. Request data must contain three fields, separated with spaces: name, type, class. Example: www.com. A IN. Response data converted to text using DNSJava. Request flags can be set using +/- integer value on new line, eg 7 sets reqursion desired flag.
kg.apc.jmeter.samplers.UDPSamplerThis implementation used as default when no valid class name specified in GUI. It makes no conversion on data.

Anyone can write his own encoder/decoder, implementing kg.apc.jmeter.samplers.UDPTrafficDecoder interface.

Read Buffer Length

UDP Request reads response using buffer with default length of 4KB. You may override this value by setting JMeter property kg.apc.jmeter.samplers.ReceiveBufferSize in bytes.

Example

Download Example Test Plan

Article: Performance Testing DNS Server with JMeter